aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2011-03-18 10:35:54 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2011-03-18 10:35:54 +0000
commit8e56b8ee7b703ea5a50492f7ae44294b7e4c39fb (patch)
treea283bc9f3750e7f183fc809cf8c630ab9959eb82 /Makefile
downloadsrc-8e56b8ee7b703ea5a50492f7ae44294b7e4c39fb.tar.gz
src-8e56b8ee7b703ea5a50492f7ae44294b7e4c39fb.zip
Import openresolv-3.4.1.vendor/openresolv/3.4.1
Notes
Notes: svn path=/vendor/openresolv/dist/; revision=219732 svn path=/vendor/openresolv/3.4.1/; revision=219733; tag=vendor/openresolv/3.4.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile66
1 files changed, 66 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..e4e3498ac9f4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,66 @@
+include config.mk
+
+NAME= openresolv
+VERSION= 3.4.1
+PKG= ${NAME}-${VERSION}
+
+INSTALL?= install
+SED?= sed
+
+BINMODE?= 0755
+DOCMODE?= 0644
+MANMODE?= 0444
+
+RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5
+SUBSCRIBERS= libc dnsmasq named pdnsd unbound
+TARGET= ${RESOLVCONF} ${SUBSCRIBERS}
+SRCS= ${TARGET:C,$,.in,} # pmake
+SRCS:= ${TARGET:=.in} # gmake
+
+SED_PREFIX= -e 's:@PREFIX@:${PREFIX}:g'
+SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
+SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
+SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g'
+SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g'
+SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g'
+
+.SUFFIXES: .in
+
+all: ${TARGET}
+
+.in:
+ ${SED} ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+ ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
+ $< > $@
+
+clean:
+ rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
+
+distclean: clean
+ rm -f config.mk
+
+installdirs:
+
+install: ${TARGET}
+ ${INSTALL} -d ${DESTDIR}${SBINDIR}
+ ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR}
+ ${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
+ test -e ${DESTDIR}${SYSCONFDIR}/resolvconf.conf || \
+ ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
+ ${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
+ ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
+ ${INSTALL} -d ${DESTDIR}${MANDIR}/man8
+ ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8
+ ${INSTALL} -d ${DESTDIR}${MANDIR}/man5
+ ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5
+
+import:
+ rm -rf /tmp/${PKG}
+ ${INSTALL} -d /tmp/${PKG}
+ cp README ${SRCS} /tmp/${PKG}
+
+dist: import
+ cp configure Makefile resolvconf.conf /tmp/${PKG}
+ tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG}
+ rm -rf /tmp/${PKG}
+ ls -l ${PKG}.tar.bz2