##################### GENERAL ##################### 
GARNAME = bind
GARVERSION = 9.11.20
GARELEASE = 1
HOME_URL = https://www.isc.org/bind/
CATEGORIES = net
MASTER_SITES += https://downloads.isc.org/isc/bind9/$(ORIGVERSION)/
DISTFILES = bind-$(ORIGVERSION).tar.gz
PATCHFILES = named-s6-notify.patch
MAINTAINER = Felipe Sanchez <izto@asic-linux.com.mx>
LICENSE = ISC


DESCRIPTION = The most widely used Name Server Software
define BLURB

BIND is open source software that implements the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications.  The name BIND stands for
"Berkeley Internet Name Domain", because the software originated in the
early 1980s at the University of California at Berkeley.
endef

##################### PACKAGING #####################


#IZTACI_PACKAGE_PATH =

# Users and groups the binary package will create
# WHEN INSTALLED ON THE DESTINATION SYSTEM
CREATE_GROUPS = 
CREATE_USERS = 

# This is to be appended to the package's installation script
# Use it to set file owners, permissions, DB initialization, etc.
# Remember any shell variables (Such as $ROOT) have to be escaped
# like this: \$$ROOT

define DOINST_APPEND
echo
echo ------------------------------------------------------------------
echo s6-rc services installed:
echo
echo \"    bind-server\"
echo \"    bind-log\"
echo \"    bind\"
echo
echo Run \'rc update\' to add them to the live services database.
echo ------------------------------------------------------------------
echo
endef

# Required dependencies
define SLACK_REQUIRED
json-c
libcap
libxml2
lmdb
ncurses
openssl
readline
zlib
endef

# Suggested dependencies
define SLACK_SUGGESTS
endef

# Package conflicts (lprng vs cups for example)
define SLACK_CONFLICTS
endef



##################### BUILDING #####################

# Directories to be created as part of the install process.
# Can be inside the final package or just transient dirs we need
# while building it.
INSTALL_DIRS += $(DESTDIR)/var/named
INSTALL_DIRS += $(DESTDIR)/etc/s6-rc/source
INSTALL_DIRS += $(DESTDIR)/etc/sysconfig

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS     = $(WORKSRC)/Makefile
INSTALL_SCRIPTS   = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS)
NODIRPATHS = 

# If some dirs are trying to install into /, list their names
# here, such as: prefix bindir mandir
INSTALL_OVERRIDE_DIRS = 


# Dependencies are of the form categorydir/packagedir
# LIBDEPS are for libraries, and DEPENDS are for everything else
DEPENDS =
LIBDEPS =
DEPENDS =
# Builddeps are installed in the build DESTIMG
BUILDDEPS =

##################### GAR #####################

# This should go before any hand-made rules.
include config.mk
include ../level.mk

##################### CUSTOMIZING #####################


test:
	cd $(WORKSRC); $(MAKE) check
	$(MAKECOOKIE)


post-install:
	$(MAKE) s6rc
	$(MAKE) sysconfig
	$(MAKE) strip
	$(MAKE) gzip-man
	$(MAKECOOKIE)

