head	1.4;
access;
symbols
	perseant-exfatfs-base-20250801:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.6
	perseant-exfatfs-base:1.4
	netbsd-9-4-RELEASE:1.2
	netbsd-9-3-RELEASE:1.2
	cjep_sun2x:1.4.0.4
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.2
	cjep_staticlib_x:1.4.0.2
	cjep_staticlib_x-base:1.4
	netbsd-9-1-RELEASE:1.2
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	phil-wifi-20200406:1.4
	netbsd-9-0-RELEASE:1.2
	netbsd-9-0-RC2:1.2
	netbsd-9-0-RC1:1.2
	openresolv-3-9-2:1.1.1.2
	netbsd-9:1.2.0.2
	netbsd-9-base:1.2
	openresolv-3-9-1:1.1.1.1
	roy:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2019.09.13.13.35.06;	author roy;	state dead;
branches;
next	1.3;
commitid	Bf0BWYV66Z4u2RCB;

1.3
date	2019.09.08.20.48.50;	author roy;	state Exp;
branches;
next	1.2;
commitid	H8vmwN1TWojhBfCB;

1.2
date	2019.07.17.18.31.43;	author roy;	state Exp;
branches;
next	1.1;
commitid	XTvWRFoiZj6RxqvB;

1.1
date	2019.07.17.18.24.23;	author roy;	state Exp;
branches
	1.1.1.1;
next	;
commitid	QEvEWpLxLAN9vqvB;

1.1.1.1
date	2019.07.17.18.24.23;	author roy;	state Exp;
branches;
next	1.1.1.2;
commitid	QEvEWpLxLAN9vqvB;

1.1.1.2
date	2019.09.08.20.46.17;	author roy;	state Exp;
branches;
next	;
commitid	7qurtMgM51sbAfCB;


desc
@@


1.4
log
@Sync
@
text
@PKG=		openresolv

# 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

ECHO?=		echo
INSTALL?=	install
SED?=		sed

VERSION!=	${SED} -n 's/OPENRESOLV_VERSION="\(.*\)".*/\1/p' resolvconf.in

BINMODE?=	0755
DOCMODE?=	0644
MANMODE?=	0444

RESOLVCONF=	resolvconf resolvconf.8 resolvconf.conf.5
SUBSCRIBERS=	libc dnsmasq named pdnsd pdns_recursor unbound
TARGET=		${RESOLVCONF} ${SUBSCRIBERS}
SRCS=		${TARGET:C,$,.in,} # pmake
SRCS:=		${TARGET:=.in} # gmake

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'
SED_RCDIR=		-e 's:@@RCDIR@@:${RCDIR}:g'
SED_STATUSARG=		-e 's:@@STATUSARG@@:${STATUSARG}:g'

DISTPREFIX?=	${PKG}-${VERSION}
DISTFILEGZ?=	${DISTPREFIX}.tar.gz
DISTFILE?=	${DISTPREFIX}.tar.xz
DISTINFO=	${DISTFILE}.distinfo
DISTINFOSIGN=	${DISTINFO}.asc
CKSUM?=		cksum -a SHA256
PGP?=		netpgp

GITREF?=	HEAD

.SUFFIXES: .in

all: ${TARGET}

.in: Makefile ${CONFIG_MK}
	${SED}	${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
		${SED_VARDIR} \
		${SED_RCDIR} ${SED_RESTARTCMD} ${SED_RCDIR} ${SED_STATUSARG} \
		$< > $@@

clean:
	rm -f ${TARGET}

distclean: clean
	rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}

installdirs:

proginstall: ${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}

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

dist-git:
	git archive --prefix=${DISTPREFIX}/ ${GITREF} | xz >${DISTFILE}

dist-inst:
	mkdir /tmp/${DISTPREFIX}
	cp -RPp * /tmp/${DISTPREFIX}
	(cd /tmp/${DISTPREFIX}; make clean)
	tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
	rm -rf /tmp/${DISTPREFIX}

dist: dist-git

distinfo: dist
	rm -f ${DISTINFO} ${DISTINFOSIGN}
	${CKSUM} ${DISTFILE} >${DISTINFO}
	#printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO}
	${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
	chmod 644 ${DISTINFOSIGN}
	ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}

import: dist
	rm -rf /tmp/${DISTPREFIX}
	${INSTALL} -d /tmp/${DISTPREFIX}
	tar xvJpf ${DISTFILE} -C /tmp

_import-src:
	rm -rf ${DESTDIR}/*
	${INSTALL} -d ${DESTDIR}
	cp LICENSE README.md ${SRCS} resolvconf.conf ${DESTDIR};
	cp resolvconf.8.in resolvconf.conf.5.in ${DESTDIR};
	@@${ECHO}
	@@${ECHO} "============================================================="
	@@${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}"

import-src:
	${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else  echo /tmp/${DISTPREFIX}; fi`
@


1.3
log
@Sync
@
text
@@


1.2
log
@Sync
@
text
@d13 1
d24 1
a24 1
SUBSCRIBERS=	libc dnsmasq named pdnsd unbound
d107 12
@


1.1
log
@Initial revision
@
text
@a81 5
import:
	rm -rf /tmp/${DISTPREFIX}
	${INSTALL} -d /tmp/${DISTPREFIX}
	cp README ${SRCS} /tmp/${DISTPREFIX}

d101 5
@


1.1.1.1
log
@Import openresolv-3.9.1 with the following changes:

  *  More strict POSIX shell support
  *  Interfaces have an implicit metric of 0 unless specified
  *  Inline comments are stripped from nameserver and domain entries
@
text
@@


1.1.1.2
log
@Import openresolv-3.9.2 with the following changes:
  *  dnsmasq: clear cache after updating servers via dbus
  *  pdns_recursor: Fix global forwards (thus now installed by default)
  *  man: layout and misc fixes
@
text
@a12 1
ECHO?=		echo
d23 1
a23 1
SUBSCRIBERS=	libc dnsmasq named pdnsd pdns_recursor unbound
d82 5
a105 17

import: dist
	rm -rf /tmp/${DISTPREFIX}
	${INSTALL} -d /tmp/${DISTPREFIX}
	tar xvJpf ${DISTFILE} -C /tmp

_import-src:
	rm -rf ${DESTDIR}/*
	${INSTALL} -d ${DESTDIR}
	cp LICENSE README.md ${SRCS} resolvconf.conf ${DESTDIR};
	cp resolvconf.8.in resolvconf.conf.5.in ${DESTDIR};
	@@${ECHO}
	@@${ECHO} "============================================================="
	@@${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}"

import-src:
	${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else  echo /tmp/${DISTPREFIX}; fi`
@

