aboutsummaryrefslogtreecommitdiffstats
path: root/www/wwwoffle
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2000-05-19 16:44:38 +0800
committersobomax <sobomax@FreeBSD.org>2000-05-19 16:44:38 +0800
commit2b4008fe533143de894cb13f9fe0806a8fcf76d3 (patch)
tree0d9007753bf6960aaa0e25522b1e6661627e7587 /www/wwwoffle
parent9ddf65c3e2d8effb9d217db67a5e199c3900856a (diff)
downloadfreebsd-ports-gnome-2b4008fe533143de894cb13f9fe0806a8fcf76d3.tar.gz
freebsd-ports-gnome-2b4008fe533143de894cb13f9fe0806a8fcf76d3.tar.zst
freebsd-ports-gnome-2b4008fe533143de894cb13f9fe0806a8fcf76d3.zip
Several fixes and improvements:
"The wwwoffle port has "/var/spool/wwwoffle" hardcoded as the path for the spool, both in the Makefile and PLIST. Even if a user overrides this in Makefile they may not know PLIST needs changing. Also, the installation attempted to change the ownership of some files to root:wheel, this changes that to ${BINOWN}:${BINGRP}. This means one less warning message while testing the port as a non-root user if nothing else." PR: 18372 Submitted by: maintainer
Diffstat (limited to 'www/wwwoffle')
-rw-r--r--www/wwwoffle/Makefile30
-rw-r--r--www/wwwoffle/files/patch-aa21
-rw-r--r--www/wwwoffle/pkg-plist6
3 files changed, 44 insertions, 13 deletions
diff --git a/www/wwwoffle/Makefile b/www/wwwoffle/Makefile
index 7a3298083f29..953aebdf05fe 100644
--- a/www/wwwoffle/Makefile
+++ b/www/wwwoffle/Makefile
@@ -17,21 +17,41 @@ MAINTAINER= ben@scientia.demon.co.uk
USE_PERL5= yes
-MAN1= wwwoffle.1
-MAN5= wwwoffle.conf.5
-MAN8= wwwoffled.8
+# $SPOOL seems like a common name which could be used for other things, so
+# use $WWWOFFLE_SPOOL as the overriding setting.
+WWWOFFLE_SPOOL?= /var/spool
+SPOOL= ${WWWOFFLE_SPOOL}
-SPOOL= /var/spool
+PLIST_SUB+= SPOOL=${SPOOL}
MAKE_ENV+= SPOOL="${SPOOL}" \
+ BINOWN="${BINOWN}" \
+ BINGRP="${BINGRP}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
INSTALL_DATA="${INSTALL_DATA}" \
INSTALL_MAN="${INSTALL_MAN}"
+MAN1= wwwoffle.1
+MAN5= wwwoffle.conf.5
+MAN8= wwwoffled.8
+
+.if ${SPOOL} != "/var/spool"
+# If using a non-standard spool, change all the documentation (and anything
+# else) to reflect that.
+PKGMESSAGE=${WRKDIR}/MESSAGE
+
+do-configure:
+ @find ${WRKSRC} | xargs ${CHMOD} u+w
+ @find ${WRKSRC} -type f | \
+ xargs perl -pi -e 's@/var/spool/wwwoffle@${SPOOL}/wwwoffle@g'
+ @${SED} 's@/var/spool/wwwoffle@${SPOOL}/wwwoffle@g' \
+ ${PKGDIR}/MESSAGE > ${PKGMESSAGE}
+.endif
+
post-install:
@${MKDIR} ${SPOOL}/wwwoffle
@${INSTALL_SCRIPT} ${WRKSRC}/upgrade-config.pl ${SPOOL}/wwwoffle
- @${INSTALL_SCRIPT} ${FILESDIR}/wwwoffled.sh ${PREFIX}/etc/rc.d
+ @${INSTALL_SCRIPT} ${FILESDIR}/wwwoffled.sh ${PREFIX}/etc/rc.d/wwwoffled.sh.sample
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/www/wwwoffle/files/patch-aa b/www/wwwoffle/files/patch-aa
index 2e8e41fe3a24..aa018206e77f 100644
--- a/www/wwwoffle/files/patch-aa
+++ b/www/wwwoffle/files/patch-aa
@@ -1,12 +1,12 @@
---- Makefile.orig Sun Apr 2 18:27:30 2000
-+++ Makefile Thu Apr 20 15:27:06 2000
+--- Makefile.orig Fri May 19 11:35:02 2000
++++ Makefile Fri May 19 11:35:55 2000
@@ -16,9 +16,9 @@
LOCALHOST=localhost:8080
-INSTDIR=/usr/local
--SPOOLDIR=/var/spool/wwwoffle
--CONFDIR=/var/spool/wwwoffle
+-SPOOLDIR=/var/tmp/w/wwwoffle
+-CONFDIR=/var/tmp/w/wwwoffle
+INSTDIR=$(PREFIX)
+SPOOLDIR=$(SPOOL)/wwwoffle
+CONFDIR=$(SPOOL)/wwwoffle
@@ -129,12 +129,23 @@
done )
+@@ -354,8 +353,8 @@
+ cd $(SPOOLDIR)/html && ./fixup-install.sh $(SPOOLDIR) $(LOCALHOST) && rm ./fixup-install.sh
+ # Now fix the permissions that tar preserved, we needed to use 'tar xpf' to get round root's umask.
+ # These two will fail unless you are root, that is OK because the owner is already you.
+- -chown -R 0 $(SPOOLDIR)/html > /dev/null 2>&1
+- -chgrp -R 0 $(SPOOLDIR)/html > /dev/null 2>&1
++ -chown -R ${BINOWN} $(SPOOLDIR)/html > /dev/null 2>&1
++ -chgrp -R ${BINGRP} $(SPOOLDIR)/html > /dev/null 2>&1
+
+ install_config :
+ sed -e 's%SPOOLDIR%$(SPOOLDIR)%' -e 's%CONFDIR%$(CONFDIR)%' < wwwoffle.conf > wwwoffle.conf.install
@@ -365,7 +364,7 @@
echo "WWWOFFLE: There is already a configuration file $(CONFDIR)/wwwoffle.conf." ;\
echo "WWWOFFLE: Run 'perl upgrade-config.pl $(CONFDIR)/wwwoffle.conf' to upgrade it." ;\
echo "WWWOFFLE: " )
- [ ! -f $(CONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf.install
-+ $(INSTALL_DATA) wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf.install
++ $(INSTALL_DATA) wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf.default
[ -f $(CONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf
install_fixup-win32:
diff --git a/www/wwwoffle/pkg-plist b/www/wwwoffle/pkg-plist
index 648654717035..1f0d255b4089 100644
--- a/www/wwwoffle/pkg-plist
+++ b/www/wwwoffle/pkg-plist
@@ -5,7 +5,7 @@ bin/wwwoffle-read
bin/wwwoffle-rm
bin/wwwoffle-tools
bin/wwwoffle-write
-etc/rc.d/wwwoffled.sh
+etc/rc.d/wwwoffled.sh.sample
sbin/wwwoffled
share/doc/wwwoffle/CHANGES.CONF
share/doc/wwwoffle/CONVERT
@@ -22,7 +22,7 @@ share/doc/wwwoffle/README.lang
share/doc/wwwoffle/README.win32
share/doc/wwwoffle/UPGRADE
@dirrm share/doc/wwwoffle
-@cwd /var/spool
+@cwd %%SPOOL%%
wwwoffle/html/FAQ.html
wwwoffle/html/Welcome.html
wwwoffle/html/htdig/button1.gif
@@ -137,7 +137,7 @@ wwwoffle/outgoing/Owwwoffle-user
wwwoffle/outgoing/Uwwwoffle-browser
wwwoffle/outgoing/Uwwwoffle-user
wwwoffle/upgrade-config.pl
-wwwoffle/wwwoffle.conf.install
+wwwoffle/wwwoffle.conf.default
@dirrm wwwoffle/html/htdig/conf
@dirrm wwwoffle/html/htdig/db
@dirrm wwwoffle/html/htdig/db-lasttime