Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2014 23:28:53 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r366692 - in head/www/zerowait-httpd: . files
Message-ID:  <201408302328.s7UNSr3C042915@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Sat Aug 30 23:28:52 2014
New Revision: 366692
URL: http://svnweb.freebsd.org/changeset/ports/366692
QAT: https://qat.redports.org/buildarchive/r366692/

Log:
  - 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]

Added:
  head/www/zerowait-httpd/files/pkg-deinstall.in   (contents, props changed)
Modified:
  head/www/zerowait-httpd/Makefile
  head/www/zerowait-httpd/files/patch-Makefile
  head/www/zerowait-httpd/pkg-plist

Modified: head/www/zerowait-httpd/Makefile
==============================================================================
--- head/www/zerowait-httpd/Makefile	Sat Aug 30 22:58:38 2014	(r366691)
+++ head/www/zerowait-httpd/Makefile	Sat Aug 30 23:28:52 2014	(r366692)
@@ -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>

Modified: head/www/zerowait-httpd/files/patch-Makefile
==============================================================================
--- head/www/zerowait-httpd/files/patch-Makefile	Sat Aug 30 22:58:38 2014	(r366691)
+++ head/www/zerowait-httpd/files/patch-Makefile	Sat Aug 30 23:28:52 2014	(r366692)
@@ -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

Added: head/www/zerowait-httpd/files/pkg-deinstall.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/zerowait-httpd/files/pkg-deinstall.in	Sat Aug 30 23:28:52 2014	(r366692)
@@ -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

Modified: head/www/zerowait-httpd/pkg-plist
==============================================================================
--- head/www/zerowait-httpd/pkg-plist	Sat Aug 30 22:58:38 2014	(r366691)
+++ head/www/zerowait-httpd/pkg-plist	Sat Aug 30 23:28:52 2014	(r366692)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408302328.s7UNSr3C042915>