- Support staging [1]
- Modernize pkg-plist and don't force removal of logs upon deinstall - Bump PORTREVISION PR: 189954 (based on) [1] Submitted by: <joe@thrallingpenguin.com> [1]
This commit is contained in:
parent
4a5caa8357
commit
ea3a1bbe24
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366692
4 changed files with 54 additions and 22 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= zerowait
|
||||
PORTVERSION= 0.8d
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://mirror.mcx2.org/
|
||||
PKGNAMESUFFIX= -httpd
|
||||
|
@ -20,6 +20,6 @@ ALL_TARGET= #none
|
|||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX} --owner=${WWWOWN} --group=${WWWGRP}
|
||||
PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
|
||||
SUB_FILES= pkg-deinstall
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- Makefile.orig 2008-03-16 00:44:45.000000000 +0100
|
||||
+++ Makefile 2008-09-26 19:44:38.000000000 +0200
|
||||
@@ -13,13 +13,14 @@
|
||||
@@ -13,15 +13,13 @@
|
||||
rm -f *~ src/*~
|
||||
|
||||
install: compile
|
||||
|
@ -11,13 +11,15 @@
|
|||
- install -b -m 644 docs/*.txt $(ROOT)/docs
|
||||
- install -b bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
|
||||
- install -b -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/bin
|
||||
+ test -d $(ROOT)/0W-httpd || (mkdir $(ROOT)/0W-httpd)
|
||||
+ install -d $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/pids
|
||||
+ install -m 755 bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
|
||||
+ install -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/sbin
|
||||
+ test -d $(ROOT)/etc/0W-httpd || (mkdir $(ROOT)/etc/0W-httpd && cd conf/ && \
|
||||
+ cp countries* $(ROOT)/etc/0W-httpd/ && \
|
||||
+ cp httpd.conf $(ROOT)/etc/0W-httpd/httpd.conf.sample )
|
||||
+ chown -R $(OWNER):$(GROUP) $(ROOT)/sbin/0W-httpd $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/pids
|
||||
@echo
|
||||
@echo "Installed, run as root: $(ROOT)/bin/0W-httpd [-h]"
|
||||
- @echo
|
||||
- @echo "Installed, run as root: $(ROOT)/bin/0W-httpd [-h]"
|
||||
+ install -d $(DESTDIR)$(ROOT)/0W-httpd/data $(DESTDIR)$(ROOT)/0W-httpd/logs $(DESTDIR)$(ROOT)/0W-httpd/pids
|
||||
+ $(BSD_INSTALL_SCRIPT) bin/update-countries.sh $(DESTDIR)$(ROOT)/bin
|
||||
+ $(BSD_INSTALL_PROGRAM) src/httpd/convert-ranges src/httpd/convert-geoip $(DESTDIR)$(ROOT)/bin
|
||||
+ $(BSD_INSTALL_PROGRAM) src/httpd/0W-httpd $(DESTDIR)$(ROOT)/sbin
|
||||
+ mkdir -p $(DESTDIR)$(ROOT)/etc/0W-httpd
|
||||
+ $(BSD_INSTALL_DATA) conf/countries* $(DESTDIR)$(ROOT)/etc/0W-httpd
|
||||
+ $(BSD_INSTALL_DATA) conf/httpd.conf $(DESTDIR)$(ROOT)/etc/0W-httpd/httpd.conf.sample
|
||||
|
||||
upgrade: install
|
||||
$(ROOT)/bin/0W-httpd -t
|
||||
|
|
26
www/zerowait-httpd/files/pkg-deinstall.in
Normal file
26
www/zerowait-httpd/files/pkg-deinstall.in
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/sbin
|
||||
zerowait_logdir="%%LOCALBASE%%/0W-httpd/logs"
|
||||
|
||||
case $2 in
|
||||
POST-DEINSTALL)
|
||||
if [ -d ${zerowait_logdir} ] ; then
|
||||
echo "===> Post-deinstallation information for $1:"
|
||||
echo ""
|
||||
echo " In order to ease updates, the log directories and"
|
||||
echo " configuration files modified by you were preserved."
|
||||
echo ""
|
||||
echo " Please remove them manually if you do not want to use"
|
||||
echo " Zerowait any longer."
|
||||
echo ""
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 64
|
||||
;;
|
||||
esac
|
||||
exit 0
|
|
@ -1,19 +1,23 @@
|
|||
@unexec %D/etc/rc.d/0W-httpd stop
|
||||
@stopdaemon 0W-httpd
|
||||
bin/convert-geoip
|
||||
bin/convert-ranges
|
||||
bin/update-countries.sh
|
||||
etc/0W-httpd/countries
|
||||
etc/0W-httpd/countries.ips
|
||||
etc/0W-httpd/countries.rus
|
||||
@unexec if cmp -s %D/etc/0W-httpd/httpd.conf.sample %D/etc/0W-httpd/httpd.conf; then rm -f %D/etc/0W-httpd/httpd.conf; fi
|
||||
etc/0W-httpd/httpd.conf.sample
|
||||
@exec if [ ! -f %D/etc/0W-httpd/httpd.conf ] ; then cp -p %D/%F %B/httpd.conf; fi
|
||||
@sample etc/0W-httpd/httpd.conf.sample
|
||||
@group %%WWWGRP%%
|
||||
@owner %%WWWOWN%%
|
||||
@mode 6755
|
||||
sbin/0W-httpd
|
||||
@mode
|
||||
@exec install -d -o %%WWWOWN%% -g %%WWWGRP%% %D/0W-httpd/pids
|
||||
@exec install -d -o %%WWWOWN%% -g %%WWWGRP%% %D/0W-httpd/data
|
||||
@exec install -d -o %%WWWOWN%% -g %%WWWGRP%% %D/0W-httpd/logs
|
||||
sbin/0W-httpd
|
||||
@unexec rm -fr %D/0W-httpd/logs > /dev/null 2>&1 || true
|
||||
@dirrmtry 0W-httpd/pids
|
||||
@dirrmtry 0W-httpd/data
|
||||
@dirrmtry 0W-httpd/logs
|
||||
@owner
|
||||
@group
|
||||
@dirrmtry etc/0W-httpd
|
||||
@dirrm 0W-httpd/pids
|
||||
@dirrm 0W-httpd/data
|
||||
@dirrm 0W-httpd
|
||||
@dirrmtry 0W-httpd
|
||||
|
|
Loading…
Reference in a new issue