ports/117003: [MAINTAINER] www/abyssws - Some fixes
Dan Voisine
voisined at wit.edu
Mon Oct 8 02:10:02 UTC 2007
>Number: 117003
>Category: ports
>Synopsis: [MAINTAINER] www/abyssws - Some fixes
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 08 02:10:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Dan Voisine
>Release: FreeBSD 6.2-RELEASE-p4
>Organization:
>Environment:
FreeBSD dan.voisine.private 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:40:53 UTC 2007 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
-Correctly define dependency
-For FreeBSD 6.X and later
-Correctly preserve index.html
-Remove user and group left behind at deinstall (thanks to pointyhat error log)
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ru /usr/ports/www/abyssws/Makefile /home/voisined/abyssws/Makefile
--- /usr/ports/www/abyssws/Makefile Sat Sep 15 05:16:59 2007
+++ /home/voisined/abyssws/Makefile Sun Oct 7 21:46:47 2007
@@ -15,17 +15,30 @@
MAINTAINER= voisined at 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 +48,15 @@
${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>
Only in /home/voisined/abyssws: diff
diff -ru /usr/ports/www/abyssws/pkg-install /home/voisined/abyssws/pkg-install
--- /usr/ports/www/abyssws/pkg-install Sat Sep 15 05:16:59 2007
+++ /home/voisined/abyssws/pkg-install Sun Oct 7 21:51:03 2007
@@ -39,10 +39,7 @@
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 @@
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 -ru /usr/ports/www/abyssws/pkg-plist /home/voisined/abyssws/pkg-plist
--- /usr/ports/www/abyssws/pkg-plist Sat Sep 15 05:16:59 2007
+++ /home/voisined/abyssws/pkg-plist Sun Oct 7 21:46:47 2007
@@ -98,7 +98,9 @@
lib/abyssws/lang/fr.lng
lib/abyssws/license.txt
lib/abyssws/htdocs/pwrabyss.gif
-lib/abyssws/htdocs/index.html
+ at 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
+ at 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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list