aboutsummaryrefslogtreecommitdiffstats
path: root/www/abyssws
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2007-12-15 04:37:54 +0800
committerpav <pav@FreeBSD.org>2007-12-15 04:37:54 +0800
commitaefff7f38d5095ffbbdea67f4a02643fabfb7582 (patch)
tree3020a6bb60a1a7653d502a1e137d42a4cfa4af82 /www/abyssws
parent8d892577de90ad7edae45f9419e5efdcf88a21ea (diff)
downloadfreebsd-ports-gnome-aefff7f38d5095ffbbdea67f4a02643fabfb7582.tar.gz
freebsd-ports-gnome-aefff7f38d5095ffbbdea67f4a02643fabfb7582.tar.zst
freebsd-ports-gnome-aefff7f38d5095ffbbdea67f4a02643fabfb7582.zip
- Correctly define dependency
- For FreeBSD 6.X and later - Correctly preserve index.html - Remove user and group left behind at deinstall PR: ports/117003 Submitted by: Dan Voisine <voisined@wit.edu> (maintainer)
Diffstat (limited to 'www/abyssws')
-rw-r--r--www/abyssws/Makefile28
-rw-r--r--www/abyssws/pkg-install34
-rw-r--r--www/abyssws/pkg-plist4
3 files changed, 54 insertions, 12 deletions
diff --git a/www/abyssws/Makefile b/www/abyssws/Makefile
index 8dd4b28d68b8..e5b7e86bfdd4 100644
--- a/www/abyssws/Makefile
+++ b/www/abyssws/Makefile
@@ -7,6 +7,7 @@
PORTNAME= abyssws
PORTVERSION= 2.5
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.aprelium.com/data/
DISTNAME= abwsx1-freebsd
@@ -15,17 +16,30 @@ EXTRACT_SUFX= .tgz
MAINTAINER= voisined@wit.edu
COMMENT= Abyss Web Server is a compact and easy to use web server
-LIB_DEPENDS= c.6:${PORTSDIR}/misc/compat6x
-
WRKSRC= ${WRKDIR}/abyssws
ONLY_FOR_ARCHS= i386
NO_BUILD= yes
+PKGDEINSTALL= ${PKGINSTALL}
USE_RC_SUBR= abyssws.sh
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 600000
+IGNORE= is for FreeBSD 6.x and newer
+.endif
+
+.if ${OSVERSION} >= 700043
+LIB_DEPENDS+= c.6:${PORTSDIR}/misc/compat6x
+.endif
+
pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+ @if [ -f ${WRKSRC}/htdocs/index.html ]; then \
+ ${MV} -f ${WRKSRC}/htdocs/index.html \
+ ${WRKSRC}/htdocs/index.html-dist ; \
+ fi
do-install:
@${INSTALL} -d ${PREFIX}/lib/abyssws
@@ -35,7 +49,15 @@ do-install:
${PREFIX}/lib/abyssws' >> ${TMPPLIST}
post-install:
+ @if [ ! -f ${PREFIX}/lib/abyssws/htdocs/index.html ]; then \
+ ${CP} -p ${PREFIX}/lib/abyssws/htdocs/index.html-dist \
+ ${PREFIX}/lib/abyssws/htdocs/index.html ; \
+ fi
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
-.include <bsd.port.mk>
+post-deinstall:
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGDEINSTALL} ${PORTNAME} POST-DEINSTALL
+
+.include <bsd.port.post.mk>
diff --git a/www/abyssws/pkg-install b/www/abyssws/pkg-install
index eb516276e4ad..6197af7277fa 100644
--- a/www/abyssws/pkg-install
+++ b/www/abyssws/pkg-install
@@ -39,10 +39,7 @@ PRE-INSTALL)
chown ${USER}:${GROUP} ${WSHOME}
fi
- if [ -r ${WSHOME}/htdocs/index.html ] ; then
- mv ${WSHOME}/htdocs/index.html ${WSHOME}/htdocs/index.html.bak
- fi
-
+
;;
POST-INSTALL)
@@ -50,11 +47,32 @@ POST-INSTALL)
chmod -R u+w,o-rx ${WSHOME}
chmod u+s ${WSHOME}/abyssws
- if [ -r ${WSHOME}/htdocs/index.html.bak ] ; then
- mv ${WSHOME}/htdocs/index.html.bak ${WSHOME}/htdocs/index.html
- fi
-
+
;;
+POST-DEINSTALL)
+ if ! [ -x ${WSHOME} ] ; then
+ if pw group show "${GROUP}" 2>/dev/null; then
+ if pw groupdel ${GROUP}; then
+ echo "Removed group \"${GROUP}\"."
+ else
+ echo "Removing group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ else
+ echo "Group \"${GROUP}\" doesn't exist!"
+ fi
+ if pw user show "${USER}" 2>/dev/null; then
+ if pw userdel ${USER}; then
+ echo "Removed user \"${USER}\"."
+ else
+ echo "Removing user \"${USER}\" failed..."
+ exit 1
+ fi
+ else
+ echo "User \"${USER}\" doesn't exist!"
+ fi
+ fi
+ ;;
esac
diff --git a/www/abyssws/pkg-plist b/www/abyssws/pkg-plist
index 94cc571a2de1..57cbb7bc66f0 100644
--- a/www/abyssws/pkg-plist
+++ b/www/abyssws/pkg-plist
@@ -98,7 +98,9 @@ lib/abyssws/lang/ar.lng
lib/abyssws/lang/fr.lng
lib/abyssws/license.txt
lib/abyssws/htdocs/pwrabyss.gif
-lib/abyssws/htdocs/index.html
+@unexec if cmp -s %D/lib/abyssws/htdocs/index.html-dist %D/lib/abyssws/htdocs/index.html; then rm -f %D/lib/abyssws/htdocs/index.html; fi
+lib/abyssws/htdocs/index.html-dist
+@exec if [ ! -f %D/lib/abyssws/htdocs/index.html ] ; then cp -p %D/%F %B/index.html; fi
@dirrm lib/abyssws/console
@dirrm lib/abyssws/doc
@dirrmtry lib/abyssws/htdocs