PageRenderTime 29ms CodeModel.GetById 14ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/openresolv/Makefile

https://bitbucket.org/freebsd/freebsd-head/
Makefile | 66 lines | 52 code | 14 blank | 0 comment | 1 complexity | 686d5baccf8e862a05c6e85714c0326b MD5 | raw file
 1include config.mk
 2
 3NAME=		openresolv
 4VERSION=	3.4.1
 5PKG=		${NAME}-${VERSION}
 6
 7INSTALL?=	install
 8SED?=		sed
 9
10BINMODE?=	0755
11DOCMODE?=	0644
12MANMODE?=	0444
13
14RESOLVCONF=	resolvconf resolvconf.8 resolvconf.conf.5
15SUBSCRIBERS=	libc dnsmasq named pdnsd unbound
16TARGET=		${RESOLVCONF} ${SUBSCRIBERS}
17SRCS=		${TARGET:C,$,.in,} # pmake
18SRCS:=		${TARGET:=.in} # gmake
19
20SED_PREFIX=		-e 's:@PREFIX@:${PREFIX}:g'
21SED_SYSCONFDIR=		-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
22SED_LIBEXECDIR=		-e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
23SED_VARDIR=		-e 's:@VARDIR@:${VARDIR}:g'
24SED_RCDIR=		-e 's:@RCDIR@:${RCDIR}:g'
25SED_RESTARTCMD=		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g'
26
27.SUFFIXES: .in
28
29all: ${TARGET}
30
31.in:
32	${SED}	${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
33		${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
34		$< > $@
35
36clean:
37	rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
38
39distclean: clean
40	rm -f config.mk
41
42installdirs:
43
44install: ${TARGET}
45	${INSTALL} -d ${DESTDIR}${SBINDIR}
46	${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR}
47	${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
48	test -e ${DESTDIR}${SYSCONFDIR}/resolvconf.conf || \
49	${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
50	${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
51	${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
52	${INSTALL} -d ${DESTDIR}${MANDIR}/man8
53	${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
54	${INSTALL} -d ${DESTDIR}${MANDIR}/man5
55	${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
56
57import:
58	rm -rf /tmp/${PKG}
59	${INSTALL} -d /tmp/${PKG}
60	cp README ${SRCS} /tmp/${PKG}
61
62dist: import
63	cp configure Makefile resolvconf.conf /tmp/${PKG}
64	tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} 
65	rm -rf /tmp/${PKG} 
66	ls -l ${PKG}.tar.bz2