diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2014-05-21 07:24:53 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2014-05-21 07:24:53 +0800 |
commit | 75c6f21e334c5e05349496351b2dc296c4412fde (patch) | |
tree | ad606027a045e4437716647bfac275a84d265da5 /www | |
parent | be99155fc828fd49525875ff7d3d1c7f9d7211bc (diff) | |
download | freebsd-ports-gnome-75c6f21e334c5e05349496351b2dc296c4412fde.tar.gz freebsd-ports-gnome-75c6f21e334c5e05349496351b2dc296c4412fde.tar.zst freebsd-ports-gnome-75c6f21e334c5e05349496351b2dc296c4412fde.zip |
- Stagify
- Fix rc.d script
- Convert USE_BZIP2 to USES
Diffstat (limited to 'www')
-rw-r--r-- | www/twms/Makefile | 22 | ||||
-rw-r--r-- | www/twms/files/pkg-deinstall.in | 8 | ||||
-rw-r--r-- | www/twms/files/pkg-install.in | 6 | ||||
-rw-r--r-- | www/twms/files/twms.in | 2 |
4 files changed, 12 insertions, 26 deletions
diff --git a/www/twms/Makefile b/www/twms/Makefile index 9961f12add77..575444a6f505 100644 --- a/www/twms/Makefile +++ b/www/twms/Makefile @@ -3,6 +3,7 @@ PORTNAME= twms PORTVERSION= 0.02w +PORTREVISION= 1 CATEGORIES= www astro MASTER_SITES= GOOGLE_CODE @@ -16,7 +17,7 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyproj/__init__.py:${PORTSDIR}/graphics/py-pyp ${PYTHON_SITELIBDIR}/web/__init__.py:${PORTSDIR}/www/webpy \ ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging -USE_BZIP2= yes +USES= tar:bzip2 USE_PYTHON= yes NO_BUILD= yes @@ -32,7 +33,6 @@ USE_RC_SUBR= twms USERS= ${TWMS_USER} GROUPS= ${TWMS_GROUP} -NO_STAGE= yes 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 @@ -42,17 +42,11 @@ post-patch: 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 + ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/twms + ${INSTALL_DATA} ${WRKSRC}/twms/*.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/twms/ + ${INSTALL_SCRIPT} ${WRKSRC}/twms.py ${STAGEDIR}${PREFIX}/bin/twms + ${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/*.jpg ${STAGEDIR}${DATADIR}/ + ${INSTALL_DATA} ${WRKSRC}/twms/twms.conf ${STAGEDIR}${PREFIX}/etc/twms.conf.default .include <bsd.port.mk> diff --git a/www/twms/files/pkg-deinstall.in b/www/twms/files/pkg-deinstall.in index a47d8248d78a..6390d2d09a40 100644 --- a/www/twms/files/pkg-deinstall.in +++ b/www/twms/files/pkg-deinstall.in @@ -1,16 +1,12 @@ #!/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 + if pw usershow "%%USER%%" >/dev/null 2>&1; then + pw userdel "%%USER%%" || exit 1 fi fi diff --git a/www/twms/files/pkg-install.in b/www/twms/files/pkg-install.in index 93c0a096c250..077cce10d7e2 100644 --- a/www/twms/files/pkg-install.in +++ b/www/twms/files/pkg-install.in @@ -1,14 +1,10 @@ #!/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 + chown -R "%%USER%%:%%GROUP%%" "%%CACHEDIR%%" || exit 1 chmod -R 0775 "%%CACHEDIR%%" || exit 1 fi fi diff --git a/www/twms/files/twms.in b/www/twms/files/twms.in index c36c31a2c6e6..a2663e299362 100644 --- a/www/twms/files/twms.in +++ b/www/twms/files/twms.in @@ -24,7 +24,7 @@ load_rc_config $name twms_start() { - su -m ${twms_user} -c "nohup $command >/dev/null 2>&1 & ; echo \$! " | tail -1 > ${pidfile} + su -m ${twms_user} -c "nohup $command >/dev/null 2>&1 & echo \$! " | tail -1 > ${pidfile} } twms_stop() |