diff options
author | Martin Matuska <mm@FreeBSD.org> | 2014-11-22 10:35:52 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2014-11-22 10:35:52 +0000 |
commit | d5db3261208853df8515df29bf62231efbe14ebc (patch) | |
tree | f8e8fa952519a9896408c0e6c95922b4f61aacfe /www/c-icap | |
parent | f8c6ed1246c22f21a31cd2736bfa7169726d5411 (diff) |
Fix pkg-plist and install examples as *.sample
PR: 195276
Submitted by: John Marino <marino@FreeBSD.org>
Notes
Notes:
svn path=/head/; revision=373046
Diffstat (limited to 'www/c-icap')
-rw-r--r-- | www/c-icap/Makefile | 18 | ||||
-rw-r--r-- | www/c-icap/files/pkg-deinstall.in | 29 | ||||
-rw-r--r-- | www/c-icap/files/pkg-install.in | 24 | ||||
-rw-r--r-- | www/c-icap/pkg-plist | 12 |
4 files changed, 17 insertions, 66 deletions
diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile index 414f9d83270d..a4dea4d1446e 100644 --- a/www/c-icap/Makefile +++ b/www/c-icap/Makefile @@ -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> diff --git a/www/c-icap/files/pkg-deinstall.in b/www/c-icap/files/pkg-deinstall.in deleted file mode 100644 index 5a1224b02312..000000000000 --- a/www/c-icap/files/pkg-deinstall.in +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -LOG_DIR=$DEST_DIR%%LOG_DIR%% -RUN_DIR=$DEST_DIR%%RUN_DIR%% - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -if [ -d "$LOG_DIR" ]; then - rmdir $LOG_DIR > /dev/null 2> /dev/null -fi - -if [ -d "$RUN_DIR" ]; then - rmdir $RUN_DIR > /dev/null 2> /dev/null -fi - -if [ -d "$LOG_DIR" -o -d "$RUN_DIR" ]; then - echo "You may want to delete the following directories:" - if [ -d "$LOG_DIR" ]; then - echo "$LOG_DIR" - fi - if [ -d "$RUN_DIR" ]; then - echo "$RUN_DIR" - fi -fi - -exit 0 diff --git a/www/c-icap/files/pkg-install.in b/www/c-icap/files/pkg-install.in deleted file mode 100644 index 95a6851a776a..000000000000 --- a/www/c-icap/files/pkg-install.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -DEST_DIR=${PKG_DESTDIR:-} - -_USER=%%CICAP_USER%% -_GROUP=%%CICAP_GROUP%% - -LOG_DIR=$DEST_DIR%%LOG_DIR%% -RUN_DIR=$DEST_DIR%%RUN_DIR%% - -if [ "$2" = "POST-INSTALL" ]; then - if [ ! -d "$LOG_DIR" ]; then - mkdir -p "$LOG_DIR" || exit 1 - fi - - if [ ! -d "$RUN_DIR" ]; then - mkdir -p "$RUN_DIR" || exit 1 - fi - chown -R "$_USER:$_GROUP" "$LOG_DIR" "$RUN_DIR" || exit 1 - chmod 0750 "$LOG_DIR" "$RUN_DIR" || exit 1 -fi - -exit 0 diff --git a/www/c-icap/pkg-plist b/www/c-icap/pkg-plist index 918002f5acab..a6386f631fea 100644 --- a/www/c-icap/pkg-plist +++ b/www/c-icap/pkg-plist @@ -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%% |