View | Details | Raw Unified | Return to bug 199798
Collapse All | Expand All

(-)Makefile (-2 / +21 lines)
Lines 26-32 Link Here
26
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
27
CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} \
27
CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} \
28
		--with-user=${NSDUSER} \
28
		--with-user=${NSDUSER} \
29
		--with-configdir=${PREFIX}/etc/nsd \
29
		--with-configdir=${ETCDIR} \
30
		--localstatedir=${NSDLSDIR} \
30
		--localstatedir=${NSDLSDIR} \
31
		--with-dbfile=${NSDDBDIR}/nsd.db \
31
		--with-dbfile=${NSDDBDIR}/nsd.db \
32
		--with-pidfile=${NSDRUNDIR}/nsd.pid
32
		--with-pidfile=${NSDRUNDIR}/nsd.pid
Lines 47-54 Link Here
47
		differences.tex
47
		differences.tex
48
48
49
OPTIONS_DEFINE=		ROOT_SERVER LARGEFILE IPV6 BIND8_STATS CHECKING \
49
OPTIONS_DEFINE=		ROOT_SERVER LARGEFILE IPV6 BIND8_STATS CHECKING \
50
		MINRESPSIZE NSEC3 MMAP MAXIPS DOCS RRL ZONE_STATS
50
		MINRESPSIZE NSEC3 MMAP MAXIPS DOCS RRL ZONE_STATS MUNIN_PLUGIN
51
OPTIONS_DEFAULT=	LARGEFILE IPV6 NSEC3 MINRESPSIZE RRL
51
OPTIONS_DEFAULT=	LARGEFILE IPV6 NSEC3 MINRESPSIZE RRL
52
OPTIONS_SUB=	yes
52
53
53
ROOT_SERVER_DESC=	Configure as a root server
54
ROOT_SERVER_DESC=	Configure as a root server
54
LARGEFILE_DESC=		Largefile support
55
LARGEFILE_DESC=		Largefile support
Lines 60-65 Link Here
60
MAXIPS_DESC=		Raise max-ips from 8 to ${NSDMAX_IPS}
61
MAXIPS_DESC=		Raise max-ips from 8 to ${NSDMAX_IPS}
61
RRL_DESC=		Response Rate Limiting
62
RRL_DESC=		Response Rate Limiting
62
ZONE_STATS_DESC=	Separate statistics for each zone
63
ZONE_STATS_DESC=	Separate statistics for each zone
64
MUNIN_PLUGIN_DESC=	Install Munin Plugin (requires BIND8_STATS)
63
65
64
LIB_DEPENDS+=	libevent.so:${PORTSDIR}/devel/libevent2
66
LIB_DEPENDS+=	libevent.so:${PORTSDIR}/devel/libevent2
65
67
Lines 75-80 Link Here
75
RRL_CONFIGURE_ENABLE=		ratelimit
77
RRL_CONFIGURE_ENABLE=		ratelimit
76
ZONE_STATS_CONFIGURE_ENABLE=	zone-stats
78
ZONE_STATS_CONFIGURE_ENABLE=	zone-stats
77
79
80
.include <bsd.port.options.mk>
81
82
post-build:
83
.if ${PORT_OPTIONS:MMUNIN_PLUGIN}
84
	${REINPLACE_CMD} \
85
		-e 's|/usr/local|${LOCALBASE}|g' \
86
		-e 's|/usr/local/etc/nsd.conf|${ETCDIR}/nsd.conf|g' \
87
		-e 's|/usr/local/var/munin/plugin-state|/var/munin/plugin-state/root|g' \
88
		-e '90s|/var/munin/plugin-state/root|$${MUNIN_PLUGSTATE}|' \
89
		${WRKSRC}/contrib/nsd_munin_
90
.endif
91
78
post-install:
92
post-install:
79
	${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \
93
	${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \
80
		${STAGEDIR}${PREFIX}/etc/nsd/nsd.conf.sample
94
		${STAGEDIR}${PREFIX}/etc/nsd/nsd.conf.sample
Lines 84-88 Link Here
84
		${STAGEDIR}${PREFIX}/sbin/nsd-checkconf \
98
		${STAGEDIR}${PREFIX}/sbin/nsd-checkconf \
85
		${STAGEDIR}${PREFIX}/sbin/nsd-checkzone \
99
		${STAGEDIR}${PREFIX}/sbin/nsd-checkzone \
86
		${STAGEDIR}${PREFIX}/sbin/nsd-control
100
		${STAGEDIR}${PREFIX}/sbin/nsd-control
101
.if ${PORT_OPTIONS:MMUNIN_PLUGIN}
102
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins
103
	${INSTALL_SCRIPT} ${WRKSRC}/contrib/nsd_munin_ \
104
		${STAGEDIR}${PREFIX}/share/munin/plugins
105
.endif
87
106
88
.include <bsd.port.mk>
107
.include <bsd.port.mk>
(-)files/nsd.in (-1 / +1 lines)
Lines 21-27 Link Here
21
load_rc_config "${name}"
21
load_rc_config "${name}"
22
: ${nsd_enable="NO"}
22
: ${nsd_enable="NO"}
23
23
24
config=${nsd_config:=%%PREFIX%%/etc/nsd/nsd.conf}
24
config=${nsd_config:=%%ETCDIR%%/nsd.conf}
25
required_files=${config}
25
required_files=${config}
26
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${config}`
26
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${config}`
27
command="%%PREFIX%%/sbin/${name}"
27
command="%%PREFIX%%/sbin/${name}"
(-)pkg-plist (+1 lines)
Lines 9-14 Link Here
9
sbin/nsd-checkzone
9
sbin/nsd-checkzone
10
sbin/nsd-control
10
sbin/nsd-control
11
sbin/nsd-control-setup
11
sbin/nsd-control-setup
12
%%MUNIN_PLUGIN%%share/munin/plugins/nsd_munin_
12
@dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDRUNDIR%%
13
@dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDRUNDIR%%
13
@dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDDBDIR%%
14
@dir(%%NSDUSER%%,%%NSDGROUP%%,0755) %%NSDDBDIR%%
14
@exec chown -R %%NSDUSER%%:%%NSDGROUP%% %%NSDRUNDIR%%
15
@exec chown -R %%NSDUSER%%:%%NSDGROUP%% %%NSDRUNDIR%%

Return to bug 199798