summaryrefslogtreecommitdiff
path: root/package/bind/bind.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-03-05 12:11:36 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-03-05 12:11:36 +0000
commit1b276bb2b9770bf7ccb69ba7aebfc1a2556f3404 (patch)
tree2214b8bcde3cc59f326612d519f8a6c9f7cc4f0c /package/bind/bind.mk
parent2676c2029beecfe271af02b059755d0a47570972 (diff)
bind: bump version and convert to Makefile.autotools.in
Patch by Gustavo Zacarias <gustavo@zacarias.com.ar> Closes #145. Current bind package is version 9.3.2 which is from the 9.3 branch and is EOLed. It has many security bugs probably fixed in 9.3.6-P1 but since it won't be supported for long it's probably metter to move on to a supported branch. CVE-2009-0025, CVE-2008-1447, CVE-2008-0122, CVE-2007-2926 and probably more. While at it migrate to Makefile.autotools.in too. Also introduced an option for/not to install userland tools (dig, host, nslookup, nsupdate). [ Peter: don't install into staging ]
Diffstat (limited to 'package/bind/bind.mk')
-rw-r--r--package/bind/bind.mk122
1 files changed, 34 insertions, 88 deletions
diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index 15efc1bd6..42c82a8f4 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -3,99 +3,45 @@
# bind
#
#############################################################
-BIND_VERSION:=9.3.2
-BIND_SOURCE:=bind-$(BIND_VERSION).tar.gz
-BIND_SITE:=ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION)
-BIND_DIR1:=$(TOOL_BUILD_DIR)/bind-$(BIND_VERSION)
-BIND_DIR2:=$(BUILD_DIR)/bind-$(BIND_VERSION)
-BIND_CAT:=$(ZCAT)
-BIND_BINARY:=bin/named/named
-BIND_TARGET_BINARY:=usr/sbin/named
-
-$(DL_DIR)/$(BIND_SOURCE):
- $(call DOWNLOAD,$(BIND_SITE),$(BIND_SOURCE))
-
-bind-source: $(DL_DIR)/$(BIND_SOURCE)
-
-#############################################################
-#
-# build bind for use on the target system
-#
-#############################################################
-$(BIND_DIR2)/.unpacked: $(DL_DIR)/$(BIND_SOURCE)
- $(BIND_CAT) $(DL_DIR)/$(BIND_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(BIND_DIR2) package/bind/ bind\*.patch
- touch $@
-
-$(BIND_DIR2)/Makefile: $(BIND_DIR2)/.unpacked
- (cd $(BIND_DIR2); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --libdir=/lib \
- --includedir=/include \
+BIND_VERSION = 9.5.1-P1
+BIND_SOURCE = bind-$(BIND_VERSION).tar.gz
+BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION)
+BIND_LIBTOOL_PATCH = NO
+BIND_DEPENDENCIES = uclibc
+BIND_INSTALL_STAGING = NO
+BIND_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
+BIND_TARGET_SBINS = lwresd named named-checkconf named-checkzone
+BIND_TARGET_SBINS += named-compilezone rndc rndc-confgen
+BIND_TARGET_SBINS += dnssec-keygen dnssec-signzone
+BIND_TARGET_BINS = dig host nslookup nsupdate
+BIND_TARGET_LIBS = libbind9.* libdns.* libisccc.* libisccfg.* libisc.* liblwres.*
+BIND_CONF_ENV = BUILD_CC="$(TARGET_CC)" \
+ BUILD_CFLAGS="$(TARGET_CFLAGS)"
+BIND_CONF_OPT = $(DISABLE_IPV6) \
--sysconfdir=/etc \
--localstatedir=/var \
- --without-openssl \
- --with-randomdev=/dev/random \
- $(DISABLE_IPV6) \
- --with-libtool \
+ --with-randomdev=/dev/urandom \
+ --with-openssl=no \
+ --with-libxml2=no \
--with-pic \
- )
+ --with-libtool \
+ --disable-epoll \
+ --disable-threads
-$(BIND_DIR2)/$(BIND_BINARY): $(BIND_DIR2)/Makefile
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -j1 -C $(BIND_DIR2)
- touch -c $@
+$(eval $(call AUTOTARGETS,package,bind))
-#############################################################
-#
-# install bind binaries
-#
-#############################################################
-$(TARGET_DIR)/$(BIND_TARGET_BINARY): $(BIND_DIR2)/$(BIND_BINARY)
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -j1 MAKEDEFS="INSTALL_DATA=true" \
- DESTDIR=$(TARGET_DIR) -C $(BIND_DIR2)/bin install
- cd $(TARGET_DIR)/usr/man; rmdir --ignore-fail-on-non-empty man8 man5 `pwd`
+$(BIND_HOOK_POST_INSTALL):
+ rm -f $(TARGET_DIR)/isc-config.sh
+ifneq ($(BR2_PACKAGE_BIND_TOOLS),y)
+ rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS))
+endif
$(INSTALL) -m 0755 -D package/bind/bind.sysvinit $(TARGET_DIR)/etc/init.d/S81named
-bind-bin: $(TARGET_DIR)/$(BIND_TARGET_BINARY) bind-lib
-
-#############################################################
-#
-# install bind libraries
-#
-#############################################################
-$(STAGING_DIR)/lib/libdns.so: $(BIND_DIR2)/$(BIND_BINARY)
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -j1 DESTDIR=$(STAGING_DIR) -C $(BIND_DIR2)/lib install
-
-$(TARGET_DIR)/lib/libdns.so: $(STAGING_DIR)/lib/libdns.so
- mkdir -p $(TARGET_DIR)/lib
- cd $(STAGING_DIR)/lib; \
- cp -a libdns*so* libisc*so* libbind9*so* \
- liblwres*so* $(TARGET_DIR)/lib
-
-bind-lib: $(STAGING_DIR)/lib/libdns.so $(TARGET_DIR)/lib/libdns.so
-
-bind: uclibc bind-bin bind-lib
-
-bind-clean:
- -$(MAKE) -C $(BIND_DIR2) clean
-
-bind-dirclean:
- rm -rf $(BIND_DIR2)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_BIND),y)
-TARGETS+=bind
-endif
+$(BIND_TARGET_UNINSTALL):
+ $(call MESSAGE,"Uninstalling")
+ rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS))
+ rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS))
+ rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS))
+ rm -f $(TARGET_DIR)/etc/init.d/S81named
+ rm -f $(BIND_TARGET_INSTALL_TARGET) $(BIND_HOOK_POST_INSTALL)