diff options
author | Chris Rees <crees@FreeBSD.org> | 2011-07-19 17:44:30 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2011-07-19 17:44:30 +0000 |
commit | 5b93f108511a773614769dbf77d5aa094c1b7321 (patch) | |
tree | fbbf7f7e7706888bea3c0ae8fa5f7f43e4462283 /dns | |
parent | 09ce50596844401af505f9c1a4b6b17d79f833b9 (diff) | |
download | ports-5b93f108511a773614769dbf77d5aa094c1b7321.tar.gz ports-5b93f108511a773614769dbf77d5aa094c1b7321.zip |
Notes
Diffstat (limited to 'dns')
-rw-r--r-- | dns/curvedns/Makefile | 23 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-deinstall.in | 6 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-install.in | 25 | ||||
-rw-r--r-- | dns/curvedns/files/pkg-message.in | 2 | ||||
-rw-r--r-- | dns/curvedns/pkg-plist | 12 |
5 files changed, 23 insertions, 45 deletions
diff --git a/dns/curvedns/Makefile b/dns/curvedns/Makefile index f8d855fdde7c..3810dcd0e6ca 100644 --- a/dns/curvedns/Makefile +++ b/dns/curvedns/Makefile @@ -7,6 +7,7 @@ PORTNAME= curvedns PORTVERSION= 0.88.b +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= http://curvedns.on2it.net/releases/ DISTNAME= curvedns-0.88-unstable @@ -22,16 +23,12 @@ HAS_CONFIGURE= yes CONFIGURE_SCRIPT= configure.nacl ALL_TARGET= # yes, an empty target. -CURVE_USER= bind -CURVE_GROUP= bind +USERS= bind +GROUPS= bind CURVE_UID= 53 CURVE_GID= 53 -SUB_FILES= pkg-install pkg-message pkg-deinstall -SUB_LIST= CURVE_USER=${CURVE_USER} \ - CURVE_GROUP=${CURVE_GROUP} \ - CURVE_UID=${CURVE_UID} \ - CURVE_GID=${CURVE_GID} +SUB_FILES= pkg-message .include <bsd.port.pre.mk> @@ -55,14 +52,14 @@ post-configure: post-install: ${CP} ${WRKSRC}/curvedns ${WRKSRC}/curvedns-keygen ${PREFIX}/bin/ ${MKDIR} ${PREFIX}/etc/curvedns/log ${PREFIX}/etc/curvedns/env - ${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run - ${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run - ${ECHO} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID - ${ECHO} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID + ${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run.sample + ${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run.sample + ${ECHO_CMD} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID + ${ECHO_CMD} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID ${CHOWN} -R ${CURVE_UID}:${CURVE_GID} ${PREFIX}/etc/curvedns - ${CHMOD} 755 ${PREFIX}/etc/curvedns/run ${PREFIX}/etc/curvedns/log/run + ${CHMOD} 755 ${PREFIX}/etc/curvedns/run.sample \ + ${PREFIX}/etc/curvedns/log/run.sample ${CHMOD} 0700 ${PREFIX}/etc/curvedns/env - ${SH} ${PKGINSTALL} @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/dns/curvedns/files/pkg-deinstall.in b/dns/curvedns/files/pkg-deinstall.in deleted file mode 100644 index b5b0138d4221..000000000000 --- a/dns/curvedns/files/pkg-deinstall.in +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -rm -rf %%PREFIX%%/etc/curvedns diff --git a/dns/curvedns/files/pkg-install.in b/dns/curvedns/files/pkg-install.in deleted file mode 100644 index 31d86150cf58..000000000000 --- a/dns/curvedns/files/pkg-install.in +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -if ! pw groupshow %%CURVE_GROUP%% 2>/dev/null 1>&2; then - if pw groupadd %%CURVE_GROUP%% -g %%CURVE_GID%%; then - echo "Added group %%CURVE_GROUP%%" - else - echo "Adding group %%CURVE_GROUP%% failed..." - exit 1 - fi -fi - -if ! pw usershow %%CURVE_USER%% 2>/dev/null 1>&2; then - if pw useradd %%CURVE_USER%% -u %%CURVE_UID%% -g %%CURVE_GROUP%% -h - \ - -s "/usr/sbin/nologin" -d "/" \ - -c "Bind Sandbox"; \ - then - echo "Added user %%CURVE_USER%%" - else - echo "Adding user %%CURVE_USER%% failed..." - exit 1 - fi -fi - -exit 0 diff --git a/dns/curvedns/files/pkg-message.in b/dns/curvedns/files/pkg-message.in index 15ff40d9a1e9..2d624394f38d 100644 --- a/dns/curvedns/files/pkg-message.in +++ b/dns/curvedns/files/pkg-message.in @@ -7,6 +7,8 @@ ------- configure ----------------------------------------- $EDITOR %%PREFIX%%/etc/curvedns/run + # set user to "bind" (required) + # adjust IP / ports (if desired) ------- prepare/startup ----------------------------------- mkdir /var/service diff --git a/dns/curvedns/pkg-plist b/dns/curvedns/pkg-plist index b493fa510818..8f2d0a50edbb 100644 --- a/dns/curvedns/pkg-plist +++ b/dns/curvedns/pkg-plist @@ -1,3 +1,13 @@ bin/curvedns bin/curvedns-keygen -@dirrmtry etc/curvedns +%%ETCDIR%%/env/UID +%%ETCDIR%%/env/GID +@unexec cmp -s %B/%F %B/run && rm -f %B/run || true +%%ETCDIR%%/run.sample +@exec [ -f %%ETCDIR%%/run ] || cp -p %%ETCDIR%%/run.sample %%ETCDIR%%/run +@unexec cmp -s %B/%F %B/run && rm -f %B/run || true +%%ETCDIR%%/log/run.sample +@exec [ -f %%ETCDIR%%/log/run ] || cp -p %%ETCDIR%%/log/run.sample %%ETCDIR%%/log/run +@dirrmtry %%ETCDIR%%/env +@dirrmtry %%ETCDIR%%/log +@dirrmtry %%ETCDIR%% |