Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2014 10:35:53 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r373046 - in head/www/c-icap: . files
Message-ID:  <201411221035.sAMAZrMI084383@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Sat Nov 22 10:35:52 2014
New Revision: 373046
URL: https://svnweb.freebsd.org/changeset/ports/373046
QAT: https://qat.redports.org/buildarchive/r373046/

Log:
  Fix pkg-plist and install examples as *.sample
  
  PR:		195276
  Submitted by:	John Marino <marino@FreeBSD.org>

Deleted:
  head/www/c-icap/files/pkg-deinstall.in
  head/www/c-icap/files/pkg-install.in
Modified:
  head/www/c-icap/Makefile
  head/www/c-icap/pkg-plist

Modified: head/www/c-icap/Makefile
==============================================================================
--- head/www/c-icap/Makefile	Sat Nov 22 10:31:18 2014	(r373045)
+++ head/www/c-icap/Makefile	Sat Nov 22 10:35:52 2014	(r373046)
@@ -3,6 +3,7 @@
 
 PORTNAME=	c-icap
 PORTVERSION=	0.3.5
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	www
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/0.3.x/
@@ -19,8 +20,6 @@ USES=		libtool
 USE_LDCONFIG=	yes
 USE_RC_SUBR=	c-icap
 
-SUB_FILES=	pkg-install pkg-deinstall
-
 OPTIONS_DEFINE=	BDB IPV6 LDAP PERL POSIXSEM LARGE_FILES
 OPTIONS_DEFAULT=	IPV6
 LARGE_FILES_DESC=	Enable large files support
@@ -94,21 +93,26 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 LOG_DIR=	/var/log/c-icap
 RUN_DIR=	/var/run/c-icap
-PLIST_SUB+=	LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR}
-
-SUB_FILES=	pkg-install pkg-deinstall
-SUB_LIST=	CICAP_USER=${CICAP_USER} CICAP_GROUP=${CICAP_GROUP} \
-		LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR}
+PLIST_SUB+=	LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR} \
+		CICAP_USER=${CICAP_USER} CICAP_GROUP=${CICAP_GROUP}
 
 post-patch:
 	@${REINPLACE_CMD} \
 		-e 's|@prefix@/var/log|/var/log/c-icap|g' \
 		-e 's|@prefix@/etc/|@sysconfdir@/|g' \
 		${WRKSRC}/c-icap.conf.in
+	@${REINPLACE_CMD} \
+		-e 's|\.default|.sample|g' \
+		${WRKSRC}/Makefile.am ${WRKSRC}/Makefile.in
 .if ${PORT_OPTIONS:MPOSIXSEM}
 	@${REINPLACE_CMD} \
 		-e 's|@SYSV_IPC@|0|g' \
 		${WRKSRC}/include/c-icap-conf.h.in
 .endif
 
+post-install:
+	@${MKDIR} ${STAGEDIR}/${LOG_DIR} ${STAGEDIR}/${RUN_DIR}
+	@${CHOWN} ${CICAP_USER}:${CICAP_GROUP} \
+		${STAGEDIR}/${LOG_DIR} ${STAGEDIR}/${RUN_DIR}
+
 .include <bsd.port.mk>

Modified: head/www/c-icap/pkg-plist
==============================================================================
--- head/www/c-icap/pkg-plist	Sat Nov 22 10:31:18 2014	(r373045)
+++ head/www/c-icap/pkg-plist	Sat Nov 22 10:35:52 2014	(r373046)
@@ -4,12 +4,8 @@ bin/c-icap-config
 bin/c-icap-libicapapi-config
 %%BDB%%bin/c-icap-mkbdb
 bin/c-icap-stretch
-@unexec if cmp -s %D/etc/c-icap/c-icap.conf %D/etc/c-icap/c-icap.conf.default; then rm -f %D/etc/c-icap/c-icap.conf; fi
-etc/c-icap/c-icap.conf.default
-@exec [ -f %B/c-icap.conf ] || cp %B/%f %B/c-icap.conf
-@unexec if cmp -s %D/etc/c-icap/c-icap.magic %D/etc/c-icap/c-icap.magic.default; then rm -f %D/etc/c-icap/c-icap.magic; fi
-etc/c-icap/c-icap.magic.default
-@exec [ -f %B/c-icap.magic ] || cp %B/%f %B/c-icap.magic
+@sample etc/c-icap/c-icap.conf.sample
+@sample etc/c-icap/c-icap.magic.sample
 include/c_icap/access.h
 include/c_icap/acl.h
 include/c_icap/array.h
@@ -62,3 +58,7 @@ man/man8/c-icap-mkbdb.8.gz
 man/man8/c-icap-stretch.8.gz
 man/man8/c-icap.8.gz
 @dirrmtry etc/c-icap
+@cwd /
+@exec chown %%CICAP_USER%%:%%CICAP_GROUP%% %%RUN_DIR%% %%LOG_DIR%%
+@dirrmtry %%RUN_DIR%%
+@dirrmtry %%LOG_DIR%%



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