aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-05-04 20:51:27 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-05-04 20:51:27 +0000
commite995a96df6632aab983c0fb138f1db55a90d5bf6 (patch)
tree9ce6a1191ab8aeb2ccba2afed17ac26ff232526c /Makefile
parent093c93c350a0e9ff9f551e3ed38a5f02d3096a76 (diff)
downloadsrc-e995a96df6632aab983c0fb138f1db55a90d5bf6.tar.gz
src-e995a96df6632aab983c0fb138f1db55a90d5bf6.zip
Import openresolv 3.7.0.vendor/openresolv/3.7.0
PR: 199854 Obtained from: http://roy.marples.name/projects/openresolv Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/vendor/openresolv/dist/; revision=282431 svn path=/vendor/openresolv/3.7.0/; revision=282432; tag=vendor/openresolv/3.7.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile55
1 files changed, 37 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 3ab015fc28bf..aca2cb531769 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,19 @@
-include config.mk
+PKG= openresolv
+VERSION= 3.7.0
-NAME= openresolv
-VERSION= 3.4.4
-PKG= ${NAME}-${VERSION}
+# Nasty hack so that make clean works without configure being run
+_CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk
+CONFIG_MK?= ${_CONFIG_MK}
+include ${CONFIG_MK}
+
+SBINDIR?= /sbin
+SYSCONFDIR?= /etc
+LIBEXECDIR?= /libexec/resolvconf
+VARDIR?= /var/run/resolvconf
+RCDIR?= /etc/rc.d
+RESTARTCMD?= if ${RCDIR}/\1 status >/dev/null 2>\&1; then \
+ ${RCDIR}/\1 restart; \
+ fi
INSTALL?= install
SED?= sed
@@ -17,31 +28,36 @@ TARGET= ${RESOLVCONF} ${SUBSCRIBERS}
SRCS= ${TARGET:C,$,.in,} # pmake
SRCS:= ${TARGET:=.in} # gmake
-SED_PREFIX= -e 's:@PREFIX@:${PREFIX}:g'
+SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}: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'
+DISTPREFIX?= ${PKG}-${VERSION}
+DISTFILEGZ?= ${DISTPREFIX}.tar.gz
+DISTFILE?= ${DISTPREFIX}.tar.bz2
+FOSSILID?= current
+
.SUFFIXES: .in
all: ${TARGET}
.in:
- ${SED} ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+ ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
$< > $@
clean:
- rm -f ${TARGET} openresolv-${VERSION}.tar.bz2
+ rm -f ${TARGET}
distclean: clean
- rm -f config.mk
+ rm -f config.mk ${DISTFILE}
installdirs:
-install: ${TARGET}
+proginstall: ${TARGET}
${INSTALL} -d ${DESTDIR}${SBINDIR}
${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR}
${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
@@ -49,18 +65,21 @@ install: ${TARGET}
${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR}
${INSTALL} -d ${DESTDIR}${LIBEXECDIR}
${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR}
+
+maninstall:
${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
+install: proginstall maninstall
+
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
+ rm -rf /tmp/${DISTPREFIX}
+ ${INSTALL} -d /tmp/${DISTPREFIX}
+ cp README ${SRCS} /tmp/${DISPREFIX}
+
+dist:
+ fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
+ gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE}
+ rm ${DISTFILEGZ}