mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
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
This commit is contained in:
parent
1e508f2672
commit
0181081672
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28594
@ -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>
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user