xref: /freebsd/sbin/resolvconf/Makefile (revision f11c7f63056671247335df83a3fe80b94c6616ac)
1# $FreeBSD$
2
3DIST=		${.CURDIR}/../../contrib/openresolv
4.PATH:		${DIST}
5
6SCRIPTS=	resolvconf
7
8FILES=		libc dnsmasq named pdnsd unbound
9FILESDIR=	/libexec/resolvconf
10
11MAN=		resolvconf.conf.5 resolvconf.8
12
13CLEANFILES=	${SCRIPTS} ${FILES} ${MAN}
14
15SYSCONFDIR=	/etc
16RCDIR=		${SYSCONFDIR}/rc.d
17VARDIR=		/var/run/resolvconf
18
19# We don't assume to restart the services in /sbin.  So, though
20# our service(8) is in /usr/sbin, we can use it, here.
21CMD1=		\1 onestatus >/dev/null 2>\&1
22CMD2=		\1 restart
23RESTARTCMD=	/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}
24
25.for f in ${SCRIPTS} ${FILES} ${MAN}
26${f}:	${f}.in
27	sed -e 's:@PREFIX@::g' \
28		-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
29		-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
30		-e 's:@VARDIR@:${VARDIR}:g' \
31		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
32		-e 's:@RCDIR@:${RCDIR}:g' \
33		-e 's: vpn : ng[0-9]*&:g' \
34		${DIST}/$@.in > $@
35.endfor
36
37.include <bsd.prog.mk>
38