[package] bump bind release number after r17835
[openwrt/svn-archive/archive.git] / net / bind / Makefile
index 1844b050ed143b409e89778ea698e9705c91f234..a9e1365bd0f28330ee28c856e1ed8318195069e5 100644 (file)
@@ -1,34 +1,39 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bind
-PKG_VERSION:=9.3.2-P1
-PKG_RELEASE:=8
+PKG_VERSION:=9.6.1-P1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION)/
-PKG_MD5SUM:=a0b86647ef6a2d5f1e759112d08e2229
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-PKG_BUILDDEP:=libopenssl
+PKG_SOURCE_URL:= \
+       ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
+       http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
+PKG_MD5SUM:=e6ce3b355c4e6bf5d66ef100f555da3f
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/bind/Default
   SECTION:=net
   CATEGORY:=Network
+  DEPENDS:=+bind-libs +libopenssl
   TITLE:=bind
+  URL:=https://www.isc.org/software/bind
+  SUBMENU:=DNS
+endef
+
+define Package/bind-libs
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=bind shared libraries
   URL:=http://www.isc.org/sw/bind/
+  SUBMENU:=DNS
 endef
 
 define Package/bind-server
@@ -45,7 +50,7 @@ define Package/bind-tools
   $(call Package/bind/Default)
   TITLE+= administration tools (all)
 endef
-  
+
 define Package/bind-rndc
   $(call Package/bind/Default)
   TITLE+= administration tools (rndc and rndc-confgen only)
@@ -71,86 +76,95 @@ define Package/bind-dig
   TITLE+= DNS excavation tool
 endef
 
-define Package/Build/Configure
-       $(call Build/Configure/Default,\
+export BUILD_CC="$(TARGET_CC)"
+
+CONFIGURE_ARGS += \
                --enable-shared \
                --enable-static \
-               --enable-ipv6 \
                --with-randomdev="/dev/urandom" \
                --disable-threads \
                --with-openssl="$(STAGING_DIR)/usr" \
                --with-libtool \
-       )
-endef
+               --with-libxml2=no \
+               , \
+               BUILD_CC="$(TARGET_CC)" \
 
 define Build/Compile
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
+               BUILD_CC="$(HOSTCC)" \
                CC="$(HOSTCC)" \
                CFLAGS="-O2" \
+               LIBS="" \
                gen
        $(MAKE) -C $(PKG_BUILD_DIR) \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
                all install
 endef
 
+define Package/bind-libs/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+endef
+
 define Package/bind-server/install
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
-       install -d -m0755 $(1)/etc
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc
        $(CP) ./files/bind $(1)/etc/
-       install -d -m0755 $(1)/etc/init.d
-       $(CP) ./files/named.init $(1)/etc/init.d/named
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
        find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
 endef
 
 define Package/bind-client/install
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
 endef
 
 define Package/bind-tools/install
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
 endef
 
 define Package/bind-rndc/install
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
 endef
 
 define Package/bind-check/install
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
 endef
 
 define Package/bind-dnssec/install
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
 endef
 
 define Package/bind-host/install
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
 endef
 
 define Package/bind-dig/install
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
 endef
 
+$(eval $(call BuildPackage,bind-libs))
 $(eval $(call BuildPackage,bind-server))
 $(eval $(call BuildPackage,bind-client))
 $(eval $(call BuildPackage,bind-tools))