xref: /freebsd/sbin/resolvconf/Makefile (revision 22289a8c3d45efcf5671750a0ceffb1296455bab)
1b7f8411dSHajimu UMEMOTO# $FreeBSD$
2b7f8411dSHajimu UMEMOTO
3406d87b1SGlen BarberPACKAGE=runtime
4*22289a8cSEnji CooperDIST=		${SRCTOP}/contrib/openresolv
5b7f8411dSHajimu UMEMOTO.PATH:		${DIST}
6b7f8411dSHajimu UMEMOTO
7b7f8411dSHajimu UMEMOTOSCRIPTS=	resolvconf
8b7f8411dSHajimu UMEMOTO
9d7149f4eSGlen BarberFILES=		libc dnsmasq named pdnsd pdns_recursor unbound
10b7f8411dSHajimu UMEMOTOFILESDIR=	/libexec/resolvconf
11b7f8411dSHajimu UMEMOTO
12b7f8411dSHajimu UMEMOTOMAN=		resolvconf.conf.5 resolvconf.8
13b7f8411dSHajimu UMEMOTO
14b7f8411dSHajimu UMEMOTOCLEANFILES=	${SCRIPTS} ${FILES} ${MAN}
15b7f8411dSHajimu UMEMOTO
16b7f8411dSHajimu UMEMOTOSYSCONFDIR=	/etc
17b7f8411dSHajimu UMEMOTORCDIR=		${SYSCONFDIR}/rc.d
18b7f8411dSHajimu UMEMOTOVARDIR=		/var/run/resolvconf
196ff6aea6SEric BadgerSBINDIR=	/sbin
20b7f8411dSHajimu UMEMOTO
21b7f8411dSHajimu UMEMOTO# We don't assume to restart the services in /sbin.  So, though
22b7f8411dSHajimu UMEMOTO# our service(8) is in /usr/sbin, we can use it, here.
230157503dSPedro F. GiffuniCMD1=		\\$$1 onestatus >/dev/null 2>\&1
240157503dSPedro F. GiffuniCMD2=		\\$$1 restart
250157503dSPedro F. GiffuniRESTARTCMD=	"/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}"
26b7f8411dSHajimu UMEMOTO
27b7f8411dSHajimu UMEMOTO.for f in ${SCRIPTS} ${FILES} ${MAN}
28b7f8411dSHajimu UMEMOTO${f}:	${f}.in
296ff6aea6SEric Badger	sed	-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
30b7f8411dSHajimu UMEMOTO		-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
31b7f8411dSHajimu UMEMOTO		-e 's:@VARDIR@:${VARDIR}:g' \
320157503dSPedro F. Giffuni		-e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
33b7f8411dSHajimu UMEMOTO		-e 's:@RCDIR@:${RCDIR}:g' \
346ff6aea6SEric Badger		-e 's:@SBINDIR@:${SBINDIR}:g' \
35b7f8411dSHajimu UMEMOTO		-e 's: vpn : ng[0-9]*&:g' \
36b7f8411dSHajimu UMEMOTO		${DIST}/$@.in > $@
37b7f8411dSHajimu UMEMOTO.endfor
38b7f8411dSHajimu UMEMOTO
39b7f8411dSHajimu UMEMOTO.include <bsd.prog.mk>
40