perl-cross: bump to version 1.1.4
[buildroot-gz.git] / package / bind / bind.mk
blob714308977a2f97eabebf1367dae11bbaf478be58
1 ################################################################################
3 # bind
5 ################################################################################
7 BIND_VERSION = 9.11.0-P2
8 BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION)
9 # bind does not support parallel builds.
10 BIND_MAKE = $(MAKE1)
11 BIND_INSTALL_STAGING = YES
12 BIND_CONFIG_SCRIPTS = bind9-config isc-config.sh
13 BIND_LICENSE = MPLv2.0
14 BIND_LICENSE_FILES = COPYRIGHT
15 BIND_TARGET_SERVER_SBIN = arpaname ddns-confgen dnssec-checkds dnssec-coverage
16 BIND_TARGET_SERVER_SBIN += dnssec-importkey dnssec-keygen dnssec-revoke
17 BIND_TARGET_SERVER_SBIN += dnssec-settime dnssec-verify genrandom
18 BIND_TARGET_SERVER_SBIN += isc-hmac-fixup named-journalprint nsec3hash
19 BIND_TARGET_SERVER_SBIN += lwresd named named-checkconf named-checkzone
20 BIND_TARGET_SERVER_SBIN += named-compilezone rndc rndc-confgen dnssec-dsfromkey
21 BIND_TARGET_SERVER_SBIN += dnssec-keyfromlabel dnssec-signzone
22 BIND_TARGET_TOOLS_BIN = dig host nslookup nsupdate
23 BIND_CONF_ENV = \
24 BUILD_CC="$(TARGET_CC)" \
25 BUILD_CFLAGS="$(TARGET_CFLAGS)"
26 BIND_CONF_OPTS = \
27 --with-libjson=no \
28 --with-randomdev=/dev/urandom \
29 --enable-epoll \
30 --with-libtool \
31 --with-gssapi=no \
32 --enable-rrl \
33 --enable-filter-aaaa
35 ifeq ($(BR2_PACKAGE_ZLIB),y)
36 BIND_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr/include
37 BIND_DEPENDENCIES += zlib
38 else
39 BIND_CONF_OPTS += --without-zlib
40 endif
42 ifeq ($(BR2_PACKAGE_LIBCAP),y)
43 BIND_CONF_OPTS += --enable-linux-caps
44 BIND_DEPENDENCIES += libcap
45 else
46 BIND_CONF_OPTS += --disable-linux-caps
47 endif
49 ifeq ($(BR2_PACKAGE_LIBXML2),y)
50 BIND_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr --enable-newstats
51 BIND_DEPENDENCIES += libxml2
52 else
53 BIND_CONF_OPTS += --with-libxml2=no
54 endif
56 ifeq ($(BR2_PACKAGE_OPENSSL),y)
57 BIND_DEPENDENCIES += openssl
58 BIND_CONF_ENV += \
59 ac_cv_func_EVP_sha256=yes \
60 ac_cv_func_EVP_sha384=yes \
61 ac_cv_func_EVP_sha512=yes
62 BIND_CONF_OPTS += \
63 --with-openssl=$(STAGING_DIR)/usr LIBS="-lz" \
64 --with-ecdsa=yes
65 # GOST cipher support requires openssl extra engines
66 ifeq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
67 BIND_CONF_OPTS += --with-gost=yes
68 else
69 BIND_CONF_OPTS += --with-gost=no
70 endif
71 else
72 BIND_CONF_OPTS += --with-openssl=no
73 endif
75 # Used by dnssec-checkds and dnssec-coverage
76 ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),)
77 BIND_CONF_OPTS += --with-python=no
78 endif
80 ifeq ($(BR2_PACKAGE_READLINE),y)
81 BIND_DEPENDENCIES += readline
82 else
83 BIND_CONF_OPTS += --with-readline=no
84 endif
86 define BIND_TARGET_REMOVE_SERVER
87 rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SERVER_SBIN))
88 endef
90 define BIND_TARGET_REMOVE_TOOLS
91 rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_TOOLS_BIN))
92 endef
94 ifeq ($(BR2_PACKAGE_BIND_SERVER),y)
95 define BIND_INSTALL_INIT_SYSV
96 $(INSTALL) -m 0755 -D package/bind/S81named \
97 $(TARGET_DIR)/etc/init.d/S81named
98 endef
99 define BIND_INSTALL_INIT_SYSTEMD
100 $(INSTALL) -D -m 644 package/bind/named.service \
101 $(TARGET_DIR)/usr/lib/systemd/system/named.service
103 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
105 ln -sf /usr/lib/systemd/system/named.service \
106 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/named.service
107 endef
108 else
109 BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER
110 endif
112 ifeq ($(BR2_PACKAGE_BIND_TOOLS),)
113 BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS
114 endif
116 define BIND_USERS
117 named -1 named -1 * /etc/bind - - BIND daemon
118 endef
120 $(eval $(autotools-package))