Subject: builtin.mk for bind9
To: None <tech-pkg@netbsd.org>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: tech-pkg
Date: 07/17/2004 11:23:32
Now that current has bind9 in tree the bind9 package needs a builtin.mk to 
allow use of the in tree version instead.  Below is my first cut at one.  Any 
comments?

It tests the version of the named binary when what you probably actually care 
about is the version of the resolver library but its much easier to get the 
BIND version from that and I'll assume that the two will be more or less in 
sync.

cheers
mark

# $NetBSD$

.if !defined(IS_BUILTIN.bind)
IS_BUILTIN.bind=        no
.  if exists(/usr/sbin/named)
_BIND_VERSION!=/usr/sbin/named -v | ${SED} -n 's/^BIND //p'
.  endif
.  if defined(_BIND_VERSION) && !empty(_BIND_VERSION)
IS_BUILTIN.bind=        yes
BUILTIN_PKG.bind=       bind-${_BIND_VERSION}
BUILDLINK_VARS+=        BUILTIN_PKG.bind
.  endif
.endif  # IS_BUILTIN.bind
BUILDLINK_VARS+=        IS_BUILTIN.bind

USE_BUILTIN.bind?=      ${IS_BUILTIN.bind}