pkgsrc/net/djbdns-run/Makefile
jlam daad0f3d6c Modify the pkginstall framework so that it manages all aspects of
INSTALL/DEINSTALL script creation within pkgsrc.

If an INSTALL or DEINSTALL script is found in the package directory,
it is automatically used as a template for the pkginstall-generated
scripts.  If instead, they should be used simply as the full scripts,
then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC
explicitly, e.g.:

	INSTALL_SRC=	${PKGDIR}/INSTALL
	DEINSTALL_SRC=	# emtpy

As part of the restructuring of the pkginstall framework internals,
we now *always* generate temporary INSTALL or DEINSTALL scripts.  By
comparing these temporary scripts with minimal INSTALL/DEINSTALL
scripts formed from only the base templates, we determine whether or
not the INSTALL/DEINSTALL scripts are actually needed by the package
(see the generate-install-scripts target in bsd.pkginstall.mk).

In addition, more variables in the framework have been made private.
The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are
more sensible names given the very few exported variables in this
framework.  The only public variables relating to the templates are:

	INSTALL_SRC		INSTALL_TEMPLATE
	DEINSTALL_SRC		DEINSTALL_TEMPLATE
				HEADER_TEMPLATE

The packages in pkgsrc have been modified to reflect the changes in
the pkginstall framework.
2006-03-14 01:14:26 +00:00

55 lines
1.6 KiB
Makefile

# $NetBSD: Makefile,v 1.14 2006/03/14 01:14:31 jlam Exp $
#
DISTNAME= djbdns-run-20050415
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= schmonz@NetBSD.org
COMMENT= Configures djbdns to cache and serve queries
DEPENDS_DJBDNS= djbdns>=1.05nb5:../../net/djbdns
DEPENDS+= ${DEPENDS_DJBDNS}
DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
DEPENDS+= ucspi-tcp-[0-9]*:../../net/ucspi-tcp
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
NO_CHECKSUM= yes
NO_BUILD= yes
MAKE_DIRS+= ${PKG_SYSCONFDIR}/axfrdns
MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/ip
MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/servers
MAKE_DIRS+= ${PKG_SYSCONFDIR}/rbldns
MAKE_DIRS+= ${PKG_SYSCONFDIR}/tinydns
PKG_GROUPS= djbdns
PKG_USERS+= dnslog:djbdns::dnslog
PKG_USERS+= axfrdns:djbdns::axfrdns
PKG_USERS+= dnscache:djbdns::dnscache
PKG_USERS+= rbldns:djbdns::rbldns
PKG_USERS+= tinydns:djbdns::tinydns
RCD_SCRIPTS= axfrdns djbdns dnscache rbldns tinydns
FILES_SUBST+= PKGNAME=${PKGNAME:Q}
INSTALLATION_DIRS= bin share/doc/djbdns-run
.include "../../mk/bsd.prefs.mk"
# Detect the PKG_SYSCONFDIR of the installed djbdns, so we can create
# config files there and refer to them from rc.d scripts.
.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE})
INSTALLED_DJBDNS!= ${PKG_BEST_EXISTS} ${DEPENDS_DJBDNS:C/:.*$//:Q:S/\ / /g}
. if empty(INSTALLED_DJBDNS:M*_not_found_)
. if !defined(PKG_SYSCONFDIR.djbdns-run)
PKG_SYSCONFDIR.djbdns-run!= ${PKG_INFO} -Q PKG_SYSCONFDIR ${INSTALLED_DJBDNS}
. endif
. endif
.endif
do-install:
${INSTALL_DATA} ${FILESDIR}/README.pkgsrc ${PREFIX}/share/doc/djbdns-run
.include "../../mk/bsd.pkg.mk"