View | Details | Raw Unified | Return to bug 143550 | Differences between
and this patch

Collapse All | Expand All

(-)nsd/Makefile (-2 / +15 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	nsd
8
PORTNAME=	nsd
9
PORTVERSION=	3.2.4
9
PORTVERSION=	3.2.4
10
PORTREVISION=	1
10
CATEGORIES=	dns ipv6
11
CATEGORIES=	dns ipv6
11
MASTER_SITES=	http://www.nlnetlabs.nl/downloads/nsd/	\
12
MASTER_SITES=	http://www.nlnetlabs.nl/downloads/nsd/	\
12
		ftp://ftp.rhnet.is/pub/nsd/
13
		ftp://ftp.rhnet.is/pub/nsd/
Lines 19-31 Link Here
19
USE_RC_SUBR=	nsd
20
USE_RC_SUBR=	nsd
20
21
21
NSDUSER?=	bind
22
NSDUSER?=	bind
22
NSD_LSD=	/var
23
NSDGROUP?=	bind
24
NSDLSDIR=	/var
25
NSDDBDIR=	/var/db/nsd
26
NSDRUNDIR=	/var/run/nsd
23
NSDMAX_INT?=	512
27
NSDMAX_INT?=	512
24
28
25
GNU_CONFIGURE=	yes
29
GNU_CONFIGURE=	yes
26
CONFIGURE_ARGS=	--with-user=${NSDUSER} \
30
CONFIGURE_ARGS=	--with-user=${NSDUSER} \
27
		--with-configdir=${PREFIX}/etc/nsd \
31
		--with-configdir=${PREFIX}/etc/nsd \
28
		--localstatedir=${NSD_LSD}
32
		--localstatedir=${NSDLSDIR} \
33
		--with-dbfile=${NSDDBDIR}/nsd.db \
34
		--with-pidfile=${NSDRUNDIR}/nsd.pid
35
36
SUB_FILES=	pkg-install pkg-deinstall
37
SUB_LIST+=	NSDUSER=${NSDUSER} \
38
		NSDGROUP=${NSDGROUP} \
39
		NSDDBDIR=${NSDDBDIR} \
40
		NSDRUNDIR=${NSDRUNDIR}
29
41
30
USE_OPENSSL=	yes
42
USE_OPENSSL=	yes
31
43
Lines 120-125 Link Here
120
	${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}/${f}
132
	${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}/${f}
121
.endfor
133
.endfor
122
.endif
134
.endif
135
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
123
	@${CAT} ${PKGMESSAGE}
136
	@${CAT} ${PKGMESSAGE}
124
137
125
.include <bsd.port.post.mk>
138
.include <bsd.port.post.mk>
(-)nsd/files/nsd.in (-1 / +1 lines)
Lines 18-24 Link Here
18
required_files=%%PREFIX%%/etc/nsd/nsd.conf
18
required_files=%%PREFIX%%/etc/nsd/nsd.conf
19
19
20
command=%%PREFIX%%/sbin/${name}
20
command=%%PREFIX%%/sbin/${name}
21
pidfile=/var/run/${name}.pid
21
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf`
22
22
23
load_rc_config ${name}
23
load_rc_config ${name}
24
24
(-)nsd/files/pkg-deinstall.in (+16 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
5
6
NSDDBDIR=%%NSDDBDIR%%
7
NSDRUNDIR=%%NSDRUNDIR%%
8
9
if [ "$2" = "POST-DEINSTALL" ]; then
10
	echo "=> Deleting ${NSDDBDIR} if empty..."
11
	rm -d ${NSDDBDIR}  2>/dev/null || true
12
	echo "=> Deleting ${NSDRUNDIR} if empty..."
13
	rm -d ${NSDRUNDIR} 2>/dev/null || true
14
fi
15
16
exit 0
(-)nsd/files/pkg-install.in (+19 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
5
6
NSDUSER=%%NSDUSER%%
7
NSDGROUP=%%NSDGROUP%%
8
NSDDBDIR=%%NSDDBDIR%%
9
NSDRUNDIR=%%NSDRUNDIR%%
10
11
CHOWN="chown"
12
INSTALL_DIR="install -d -o ${NSDUSER} -g ${NSDGROUP} -m 0755"
13
14
if [ "$2" = "POST-INSTALL" ]; then
15
	${INSTALL_DIR} ${NSDDBDIR} ${NSDRUNDIR}
16
	${CHOWN} -R ${NSDUSER}:${NSDGROUP} ${NSDDBDIR} ${NSDRUNDIR}
17
fi
18
19
exit 0
(-)nsd/pkg-message (+4 lines)
Lines 2-5 Link Here
2
*                                                                        *
2
*                                                                        *
3
*   To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf   *
3
*   To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf   *
4
*                                                                        *
4
*                                                                        *
5
*   Take good care when using nsd commands, since they often need to     *
6
*   be executed as user dedicated to nsd, in order for the files it      *
7
*   touches or creates to have the proper permissions.                   *
8
*                                                                        *
5
**************************************************************************
9
**************************************************************************
(-)nsd/pkg-plist (-1 / +1 lines)
Lines 6-9 Link Here
6
sbin/nsd-xfer
6
sbin/nsd-xfer
7
sbin/nsdc
7
sbin/nsdc
8
sbin/zonec
8
sbin/zonec
9
@dirrm etc/nsd
9
@dirrmtry etc/nsd

Return to bug 143550