Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2012 01:01:44 +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: r302554 - in head/www/c-icap: . files
Message-ID:  <201208150101.q7F11iUe077504@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Wed Aug 15 01:01:43 2012
New Revision: 302554
URL: http://svn.freebsd.org/changeset/ports/302554

Log:
  Change configuration directory to ${PREFIX}/etc/c-icap

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

Modified: head/www/c-icap/Makefile
==============================================================================
--- head/www/c-icap/Makefile	Wed Aug 15 00:51:41 2012	(r302553)
+++ head/www/c-icap/Makefile	Wed Aug 15 01:01:43 2012	(r302554)
@@ -7,6 +7,7 @@
 
 PORTNAME=	c-icap
 PORTVERSION=	0.2.1
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	www
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/0.2.x/
@@ -42,7 +43,8 @@ MAN8=		c-icap-client.8 \
 		c-icap-stretch.8 \
 		c-icap.8
 
-CONFIGURE_ARGS+=	--enable-static
+CONFIGURE_ARGS+=	--enable-static \
+			--sysconfdir="${PREFIX}/etc/c-icap"
 
 .include <bsd.port.options.mk>
 
@@ -112,6 +114,7 @@ SUB_LIST=	CICAP_USER=${CICAP_USER} CICAP
 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
 .if ${PORT_OPTIONS:MPOSIXSEM}
 	@${REINPLACE_CMD} \
@@ -120,10 +123,10 @@ post-patch:
 .endif
 
 post-install:
-	@[ -f ${PREFIX}/etc/c-icap.conf ] || \
-		${CP} -p ${PREFIX}/etc/c-icap.conf.default ${PREFIX}/etc/c-icap.conf
-	@[ -f ${PREFIX}/etc/c-icap.magic ] || \
-		${CP} -p ${PREFIX}/etc/c-icap.magic.default ${PREFIX}/etc/c-icap.magic
+	@${CP} -np ${PREFIX}/etc/c-icap/c-icap.conf.default \
+		${PREFIX}/etc/c-icap/c-icap.conf
+	@${CP} -np ${PREFIX}/etc/c-icap/c-icap.magic.default \
+		${PREFIX}/etc/c-icap/c-icap.magic
 	@${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
 
 .include <bsd.port.post.mk>

Modified: head/www/c-icap/files/c-icap.in
==============================================================================
--- head/www/c-icap/files/c-icap.in	Wed Aug 15 00:51:41 2012	(r302553)
+++ head/www/c-icap/files/c-icap.in	Wed Aug 15 01:01:43 2012	(r302554)
@@ -28,7 +28,7 @@ stop_postcmd="rm -f $pidfile"
 # read settings, set default values
 load_rc_config "$name"
 : ${c_icap_enable="NO"}
-: ${c_icap_conf="%%PREFIX%%/etc/c-icap.conf"}
+: ${c_icap_conf="%%PREFIX%%/etc/c-icap/c-icap.conf"}
 : ${c_icap_pidfile="%%RUN_DIR%%/c-icap.pid"}
 : ${c_icap_user="%%CICAP_USER%%"}
 

Modified: head/www/c-icap/pkg-plist
==============================================================================
--- head/www/c-icap/pkg-plist	Wed Aug 15 00:51:41 2012	(r302553)
+++ head/www/c-icap/pkg-plist	Wed Aug 15 01:01:43 2012	(r302554)
@@ -5,13 +5,12 @@ 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.conf %D/etc/c-icap.conf.default; then rm -f %D/etc/c-icap.conf; fi
-etc/c-icap.conf.default
-@exec [ -f %B/c-icap.conf ] || cp -p %%PREFIX%%/%F %B/c-icap.conf
-@unexec if cmp -s %D/etc/c-icap.magic %D/etc/c-icap.magic.default; then rm -f %D/etc/c-icap.magic; fi
-etc/c-icap.magic.default
-@exec [ -f %B/c-icap.magic ] || cp -p %%PREFIX%%/%F %B/c-icap.magic
-@unexec [ ! -f %%RUN_DIR%%/c-icap.pid ] || %D/etc/rc.d/c_icap stop
+@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
 include/c_icap/access.h
 include/c_icap/acl.h
 include/c_icap/array.h
@@ -69,3 +68,4 @@ lib/c_icap/sys_logger.so
 lib/libicapapi.la
 lib/libicapapi.so.2
 lib/libicapapi.so
+@dirrmtry etc/c-icap



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