mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add port for py-webware 0.8.1,
A suite of software components for developing object-oriented, web-based applications. PR: 42295 Submitted by: Stefan Schwarzer <sschwarzer@sschwarzer.net> Reminded by: linimon (thanks!)
This commit is contained in:
parent
83b52042c7
commit
d40981d556
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=97859
7 changed files with 1512 additions and 0 deletions
|
@ -484,6 +484,7 @@
|
|||
SUBDIR += py-mt
|
||||
SUBDIR += py-scgi
|
||||
SUBDIR += py-websvcs
|
||||
SUBDIR += py-webware
|
||||
SUBDIR += pyweblib
|
||||
SUBDIR += qdecoder
|
||||
SUBDIR += quanta
|
||||
|
|
60
www/py-webware/Makefile
Normal file
60
www/py-webware/Makefile
Normal file
|
@ -0,0 +1,60 @@
|
|||
# New ports collection makefile for: Webware
|
||||
# Date created: 9 July 2002
|
||||
# Whom: Stefan Schwarzer <sschwarzer@sschwarzer.net>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= webware
|
||||
PORTVERSION= 0.8.1
|
||||
CATEGORIES= www python
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= webware
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= Webware-${PORTVERSION}
|
||||
|
||||
MAINTAINER= sschwarzer@sschwarzer.net
|
||||
COMMENT= A versatile web application server written in Python
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_CMD}:${PORTSDIR}/lang/python
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/mx/DateTime:${PORTSDIR}/lang/py-mx-base
|
||||
|
||||
USE_PYTHON= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
WEBWARE_USER?= webkit
|
||||
WEBWARE_GROUP?= ${WEBWARE_USER}
|
||||
WEBWARE_MASTER_DIR?=${PREFIX}/share/webware
|
||||
WEBKIT_HOME_DIR?=${PREFIX}/www/webkit
|
||||
INSTALL_ENV= PKG_PREFIX=${PREFIX} \
|
||||
LOCALBASE=${LOCALBASE} \
|
||||
WEBWARE_USER=${WEBWARE_USER} \
|
||||
WEBWARE_GROUP=${WEBWARE_GROUP} \
|
||||
WEBWARE_MASTER_DIR=${WEBWARE_MASTER_DIR} \
|
||||
WEBKIT_HOME_DIR=${WEBKIT_HOME_DIR}
|
||||
|
||||
pre-install:
|
||||
@ ${ECHO} '---> Making webware default user and its group'
|
||||
${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
|
||||
|
||||
do-install:
|
||||
@ ${ECHO} '---> Installing in Webware master dir'
|
||||
# ensure the target directory isn't there
|
||||
${RM} -rf ${WEBWARE_MASTER_DIR}
|
||||
${CP} -R ${WRKSRC} ${WEBWARE_MASTER_DIR}
|
||||
|
||||
@ ${ECHO} '---> Deleting native files (not used by this port)'
|
||||
${RM} -rf ${WEBWARE_MASTER_DIR}/WebKit/Native
|
||||
|
||||
@ ${ECHO} '---> Installing start/stop script'
|
||||
${SED} -e "s|%%WEBKIT_HOME_DIR%%|${WEBKIT_HOME_DIR}|g" \
|
||||
< ${FILESDIR}/webkit.sh.tmpl \
|
||||
> ${PREFIX}/etc/rc.d/webkit.sh-dist
|
||||
${CHMOD} 755 ${PREFIX}/etc/rc.d/webkit.sh-dist && \
|
||||
${CHOWN} root:wheel ${PREFIX}/etc/rc.d/webkit.sh-dist
|
||||
|
||||
post-install:
|
||||
@ ${ECHO} '---> Compiling Python files and making webkit home directory'
|
||||
${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
1
www/py-webware/distinfo
Normal file
1
www/py-webware/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (Webware-0.8.1.tar.gz) = e3db25f18891a41ebcc58e1d6df7bc10
|
38
www/py-webware/files/webkit.sh.tmpl
Normal file
38
www/py-webware/files/webkit.sh.tmpl
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Warning
|
||||
# -------
|
||||
#
|
||||
# Please edit the files in
|
||||
# %%WEBKIT_HOME_DIR%%/Configs/
|
||||
# to suit your needs. Using them as they are may cause problems.
|
||||
|
||||
# This file is adapted from databases/postgresql7/files/pgsql.sh.tmpl
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
WEBKIT_HOME_DIR=%%WEBKIT_HOME_DIR%%
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
[ -x ${WEBKIT_HOME_DIR}/AppServer ] && {
|
||||
su -l webware -c "exec ${WEBKIT_HOME_DIR}/AppServer" \
|
||||
>/dev/null 2>&1 &
|
||||
echo -n ' webkit'
|
||||
}
|
||||
;;
|
||||
|
||||
stop)
|
||||
[ -f ${WEBKIT_HOME_DIR}/appserverpid.txt ] && {
|
||||
su -l webware -c \
|
||||
"/bin/kill `cat ${WEBKIT_HOME_DIR}/appserverpid.txt`" \
|
||||
>/dev/null 2>&1
|
||||
echo -n ' webkit'
|
||||
}
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "usage: `basename $0` {start|stop}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
16
www/py-webware/pkg-descr
Normal file
16
www/py-webware/pkg-descr
Normal file
|
@ -0,0 +1,16 @@
|
|||
Webware for Python is a suite of software components for developing
|
||||
object-oriented, web-based applications. The suite uses well known design
|
||||
patterns and includes popular features such as:
|
||||
|
||||
- A fast, easy-to-use application server
|
||||
- Servlets
|
||||
- Python Server Pages (PSP)
|
||||
- Object-relational mapper
|
||||
- Task scheduler
|
||||
- User manager with authentication
|
||||
- CGI wrapper
|
||||
|
||||
WWW: http://webware.sourceforge.net/
|
||||
|
||||
- Stefan Schwarzer
|
||||
sschwarzer@sschwarzer.net
|
78
www/py-webware/pkg-install
Normal file
78
www/py-webware/pkg-install
Normal file
|
@ -0,0 +1,78 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This script is an adapted version of the pkg-install of the
|
||||
# databases/postgresql7 port. (Wouldn't it be nice to have a
|
||||
# target for making a user in bsd.port.mk or something similar?)
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
PATH=/bin:/usr/sbin:${LOCALBASE}/bin:/usr/local/bin
|
||||
|
||||
# set these if not provided by the Makefile
|
||||
WEBWARE_USER=${WEBWARE_USER:-webkit}
|
||||
WEBWARE_GROUP=${WEBWARE_USER:-webkit}
|
||||
WEBWARE_MASTER_DIR=${WEBWARE_MASTER_DIR:-${PKG_PREFIX}/share/webware}
|
||||
WEBKIT_HOME_DIR=${WEBKIT_HOME_DIR:-${PKG_PREFIX}/www/webkit}
|
||||
|
||||
add_webkit_account()
|
||||
{
|
||||
UID=101 # shouldn't be used for any other user!
|
||||
GID=${UID}
|
||||
|
||||
if pw group show "${WEBWARE_GROUP}" 2>/dev/null; then
|
||||
echo "You already have a group \"${WEBWARE_GROUP}\", so I will use it."
|
||||
else
|
||||
if pw groupadd ${WEBWARE_GROUP} -g ${GID}; then
|
||||
echo "Added group \"${WEBWARE_GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${WEBWARE_GROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if pw user show "${WEBWARE_USER}" 2>/dev/null; then
|
||||
echo "You already have a user \"${WEBWARE_USER}\", so I will use it."
|
||||
else
|
||||
if pw useradd ${WEBWARE_USER} -u ${UID} -g ${WEBWARE_GROUP} -h - \
|
||||
-d ${WEBKIT_HOME_DIR} -c "WebKit Default User"
|
||||
then
|
||||
echo "Added user \"${WEBWARE_USER}\"."
|
||||
else
|
||||
echo "Adding user \"${WEBWARE_USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
compile_python_files()
|
||||
{
|
||||
(cd ${WEBWARE_MASTER_DIR} && python install.py --password-prompt=no)
|
||||
}
|
||||
|
||||
make_webkit_home_dir()
|
||||
{
|
||||
# make the default webware user home directory if it doesn't exist yet
|
||||
if ! [ -d ${WEBKIT_HOME_DIR} ] ; then
|
||||
mkdir -p ${WEBKIT_HOME_DIR}
|
||||
fi
|
||||
|
||||
# make application workdir for webkit user
|
||||
python ${WEBWARE_MASTER_DIR}/bin/MakeAppWorkDir.py \
|
||||
${WEBKIT_HOME_DIR}
|
||||
chown -R root:wheel ${WEBKIT_HOME_DIR}
|
||||
chown -R ${WEBWARE_USER}:${WEBWARE_GROUP} \
|
||||
${WEBKIT_HOME_DIR}/Cache ${WEBKIT_HOME_DIR}/ErrorMsgs \
|
||||
${WEBKIT_HOME_DIR}/Logs ${WEBKIT_HOME_DIR}/Sessions
|
||||
}
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
add_webkit_account
|
||||
;;
|
||||
POST-INSTALL)
|
||||
compile_python_files
|
||||
if ! [ -f ${WEBKIT_HOME_DIR}/AppServer ] ; then
|
||||
make_webkit_home_dir
|
||||
fi
|
||||
;;
|
||||
esac
|
1318
www/py-webware/pkg-plist
Normal file
1318
www/py-webware/pkg-plist
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue