diff options
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | www/Makefile | 3 | ||||
-rw-r--r-- | www/twms/Makefile | 61 | ||||
-rw-r--r-- | www/twms/distinfo | 3 | ||||
-rw-r--r-- | www/twms/files/pkg-deinstall.in | 17 | ||||
-rw-r--r-- | www/twms/files/pkg-install.in | 16 | ||||
-rw-r--r-- | www/twms/files/twms.in | 40 | ||||
-rw-r--r-- | www/twms/pkg-descr | 4 | ||||
-rw-r--r-- | www/twms/pkg-plist | 23 |
10 files changed, 168 insertions, 1 deletions
@@ -78,6 +78,7 @@ sfs:*:171: agk:*:172: polipo:*:173: flowtools:*:174: +twms:*:175: rt:*:180: nagios:*:181: noc:*:182: @@ -87,6 +87,7 @@ sfs:*:171:171::0:0:Self-Certifying File System:/nonexistent:/usr/sbin/nologin agk:*:172:172::0:0:AquaGateKeeper:/nonexistent:/nonexistent polipo:*:173:173::0:0:polipo web cache:/nonexistent:/usr/sbin/nologin flowtools:*:174:174::0:0:Flow-tools collector pseudo-user:/nonexistent:/usr/sbin/nologin +twms:*:175:175::0:0:tWMS pseudo-user:/nonexistent:/usr/sbin/nologin nagios:*:181:181::0:0:Nagios pseudo-user:/var/spool/nagios:/usr/sbin/nologin noc:*:182:182::0:0:NOC pseudo-user:/usr/local/noc:/bin/sh moinmoin:*:192:192::0:0:MoinMoin User:/nonexistent:/usr/sbin/nologin diff --git a/www/Makefile b/www/Makefile index 0904d1672df0..089fe6681424 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1552,8 +1552,8 @@ SUBDIR += rubygem-rack-mount SUBDIR += rubygem-rack-test SUBDIR += rubygem-rails - SUBDIR += rubygem-railties SUBDIR += rubygem-rails-app-installer + SUBDIR += rubygem-railties SUBDIR += rubygem-ramaze SUBDIR += rubygem-redcloth SUBDIR += rubygem-rfacebook @@ -1754,6 +1754,7 @@ SUBDIR += twiki-TwistyPlugin SUBDIR += twiki-WysiwygPlugin SUBDIR += twill + SUBDIR += twms SUBDIR += typo SUBDIR += typo3 SUBDIR += typolight diff --git a/www/twms/Makefile b/www/twms/Makefile new file mode 100644 index 000000000000..e9ccc37c062e --- /dev/null +++ b/www/twms/Makefile @@ -0,0 +1,61 @@ +# New ports collection makefile for: twms +# Date created: 01 Sep 2010 +# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= twms +PORTVERSION= 0.02w +CATEGORIES= www astro +MASTER_SITES= GOOGLE_CODE + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Tiny WMS server + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyproj/__init__.py:${PORTSDIR}/graphics/py-pyproj \ + ${PYTHON_SITELIBDIR}/web/__init__.py:${PORTSDIR}/www/webpy \ + ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +USE_BZIP2= yes +USE_PYTHON= 2.6+ +NO_BUILD= yes + +TWMS_USER?= twms +TWMS_GROUP?= twms +TWMS_CACHEDIR?= /var/cache/twms + +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST+= USER=${TWMS_USER} GROUP=${TWMS_GROUP} CACHEDIR=${TWMS_CACHEDIR} + +USE_RC_SUBR= twms + +USERS= ${TWMS_USER} +GROUPS= ${TWMS_GROUP} + +post-patch: + @${REINPLACE_CMD} -e '1,1 s|/usr/bin/python|/usr/bin/env python|' ${WRKSRC}/twms.py + @${REINPLACE_CMD} -e 's|/etc/twms/twms.conf|${PREFIX}/etc/twms.conf|' ${WRKSRC}/twms/twms.py + @${REINPLACE_CMD} -e '/tiles_cache =/ s|".*"|"${TWMS_CACHEDIR}/cache/"|; \ + /install_path =/ s|".*"|"${DATADIR}/"|; \ + /gpx_cache =/ s|".*"|"${TWMS_CACHEDIR}/traces/"|; \ + s|import fetchers|from twms &|' ${WRKSRC}/twms/twms.conf + +do-install: + ${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/twms + ${INSTALL_DATA} ${WRKSRC}/twms/*.py ${PYTHONPREFIX_SITELIBDIR}/twms/ + ${INSTALL_SCRIPT} ${WRKSRC}/twms.py ${PREFIX}/bin/twms + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/*.jpg ${DATADIR}/ + ${INSTALL_DATA} ${WRKSRC}/twms/twms.conf ${PREFIX}/etc/twms.conf.default + @if [ ! -f ${PREFIX}/etc/twms.conf ]; then \ + ${CP} -p ${PREFIX}/etc/twms.conf.default ${PREFIX}/etc/twms.conf ; \ + fi + +post-install: + @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/www/twms/distinfo b/www/twms/distinfo new file mode 100644 index 000000000000..bbc977f808e7 --- /dev/null +++ b/www/twms/distinfo @@ -0,0 +1,3 @@ +MD5 (twms-0.02w.tar.bz2) = 98b30a3800231b1b6757ffdd9d4370fe +SHA256 (twms-0.02w.tar.bz2) = 085f0635e0535387e5e343106740be60e7f49ac75483dfc4f461b1d1c4c207c1 +SIZE (twms-0.02w.tar.bz2) = 35010 diff --git a/www/twms/files/pkg-deinstall.in b/www/twms/files/pkg-deinstall.in new file mode 100644 index 000000000000..a47d8248d78a --- /dev/null +++ b/www/twms/files/pkg-deinstall.in @@ -0,0 +1,17 @@ +#!/bin/sh + +USER=%%USER%% +GROUP=%%GROUP%% +CACHEDIR=%%CACHEDIR%% + +if [ "$2" = "POST-DEINSTALL" ]; then + echo "===> Removing tWMS cache directory" + rm -rf "%%CACHEDIR%%" || exit 1 + + echo "===> Removing tWMS user and group" + if pw usershow "${USER}" >/dev/null 2>&1; then + pw userdel "${USER}" || exit 1 + fi +fi + +exit 0 diff --git a/www/twms/files/pkg-install.in b/www/twms/files/pkg-install.in new file mode 100644 index 000000000000..93c0a096c250 --- /dev/null +++ b/www/twms/files/pkg-install.in @@ -0,0 +1,16 @@ +#!/bin/sh + +USER=%%USER%% +GROUP=%%GROUP%% +CACHEDIR=%%CACHEDIR%% + +if [ "$2" = "POST-INSTALL" ]; then + if [ ! -d "%%CACHEDIR%%" ]; then + mkdir -p "%%CACHEDIR%%/cache" || exit 1 + mkdir -p "%%CACHEDIR%%/traces" || exit 1 + chown -R "$USER:$GROUP" "%%CACHEDIR%%" || exit 1 + chmod -R 0775 "%%CACHEDIR%%" || exit 1 + fi +fi + +exit 0 diff --git a/www/twms/files/twms.in b/www/twms/files/twms.in new file mode 100644 index 000000000000..d6b8120713a6 --- /dev/null +++ b/www/twms/files/twms.in @@ -0,0 +1,40 @@ +#!/bin/sh +# +# PROVIDE: twms +# REQUIRE: DAEMON NETWORKING LOGIN +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable twms: +# twms_enable="YES" + +. /etc/rc.subr + +name=twms +rcvar=`set_rcvar` + +twms_enable=${twms_enable:-"NO"} +twms_user=%%USER%% +twms_group=%%GROUP%% +start_cmd="${name}_start" +stop_cmd="${name}_stop" +pidfile="/var/run/${name}.pid" +command="%%PREFIX%%/bin/twms" + +load_rc_config $name + +twms_start() +{ + su -m ${twms_user} -c "nohup $command >/dev/null 2>&1 & ; echo \$! " | tail -1 > ${pidfile} +} + +twms_stop() +{ + if [ -f ${pidfile} ]; then + rc_pid=`cat ${pidfile}` + kill -TERM $rc_pid + wait_for_pids $rc_pid + rm ${pidfile} + fi +} + +run_rc_command "$1" diff --git a/www/twms/pkg-descr b/www/twms/pkg-descr new file mode 100644 index 000000000000..4badc0fc3128 --- /dev/null +++ b/www/twms/pkg-descr @@ -0,0 +1,4 @@ +tWMS is a tiny WMS server written in Python and using tiles as a +backend storage + +WWW: http://code.google.com/p/twms/ diff --git a/www/twms/pkg-plist b/www/twms/pkg-plist new file mode 100644 index 000000000000..369094c45ba6 --- /dev/null +++ b/www/twms/pkg-plist @@ -0,0 +1,23 @@ +bin/twms +@unexec if cmp -s %D/etc/twms.conf.default %D/etc/twms.conf; then rm -f %D/etc/twms.conf; fi +etc/twms.conf.default +@exec if [ ! -f %D/etc/twms.conf ] ; then cp -p %D/%F %B/twms.conf; fi +%%PYTHON_SITELIBDIR%%/twms/__init__.py +%%PYTHON_SITELIBDIR%%/twms/bbox.py +%%PYTHON_SITELIBDIR%%/twms/canvas.py +%%PYTHON_SITELIBDIR%%/twms/capabilities.py +%%PYTHON_SITELIBDIR%%/twms/correctify.py +%%PYTHON_SITELIBDIR%%/twms/drawing.py +%%PYTHON_SITELIBDIR%%/twms/fetchers.py +%%PYTHON_SITELIBDIR%%/twms/filter.py +%%PYTHON_SITELIBDIR%%/twms/gpxparse.py +%%PYTHON_SITELIBDIR%%/twms/overview.py +%%PYTHON_SITELIBDIR%%/twms/projections.py +%%PYTHON_SITELIBDIR%%/twms/reproject.py +%%PYTHON_SITELIBDIR%%/twms/sketch.py +%%PYTHON_SITELIBDIR%%/twms/twms.py +%%DATADIR%%/irs_nxt.jpg +%%DATADIR%%/yahoo_nxt.jpg +%%DATADIR%%/yandex_nxt.jpg +@dirrm %%DATADIR%% +@dirrm %%PYTHON_SITELIBDIR%%/twms |