2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
18 http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
19 PKG_MD5SUM:=948101be324deb15ff94a5b6a639ea39
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25 PKG_BUILD_DEPENDS:=libopenssl
27 include $(INCLUDE_DIR)/package.mk
29 define Package/bind/Default
33 URL:=http://www.isc.org/sw/bind/
36 define Package/bind-server
37 $(call Package/bind/Default)
41 define Package/bind-client
42 $(call Package/bind/Default)
43 TITLE+= dynamic DNS client
46 define Package/bind-tools
47 $(call Package/bind/Default)
48 TITLE+= administration tools (all)
51 define Package/bind-rndc
52 $(call Package/bind/Default)
53 TITLE+= administration tools (rndc and rndc-confgen only)
56 define Package/bind-check
57 $(call Package/bind/Default)
58 TITLE+= administration tools (named-checkconf and named-checkzone only)
61 define Package/bind-dnssec
62 $(call Package/bind/Default)
63 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
66 define Package/bind-host
67 $(call Package/bind/Default)
68 TITLE+= simple DNS client
71 define Package/bind-dig
72 $(call Package/bind/Default)
73 TITLE+= DNS excavation tool
76 define Package/Build/Configure
77 $(call Build/Configure/Default,\
81 --with-randomdev="/dev/urandom" \
83 --with-openssl="$(STAGING_DIR)/usr" \
89 rm -rf $(PKG_INSTALL_DIR)
90 mkdir -p $(PKG_INSTALL_DIR)
91 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
96 $(MAKE) -C $(PKG_BUILD_DIR) \
97 DESTDIR="$(PKG_INSTALL_DIR)" \
101 define Package/bind-server/install
102 $(INSTALL_DIR) $(1)/usr/sbin
103 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
104 $(INSTALL_DIR) $(1)/etc
105 $(CP) ./files/bind $(1)/etc/
106 $(INSTALL_DIR) $(1)/etc/init.d
107 $(CP) ./files/named.init $(1)/etc/init.d/named
108 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
111 define Package/bind-client/install
112 $(INSTALL_DIR) $(1)/usr/bin
113 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
116 define Package/bind-tools/install
117 $(INSTALL_DIR) $(1)/usr/bin
118 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
119 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
120 $(INSTALL_DIR) $(1)/usr/sbin
121 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
122 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
123 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
124 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
125 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
126 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
129 define Package/bind-rndc/install
130 $(INSTALL_DIR) $(1)/usr/sbin
131 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
132 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
135 define Package/bind-check/install
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
138 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
141 define Package/bind-dnssec/install
142 $(INSTALL_DIR) $(1)/usr/sbin
143 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
144 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
147 define Package/bind-host/install
148 $(INSTALL_DIR) $(1)/usr/bin
149 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
152 define Package/bind-dig/install
153 $(INSTALL_DIR) $(1)/usr/bin
154 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
157 $(eval $(call BuildPackage,bind-server))
158 $(eval $(call BuildPackage,bind-client))
159 $(eval $(call BuildPackage,bind-tools))
160 $(eval $(call BuildPackage,bind-rndc))
161 $(eval $(call BuildPackage,bind-check))
162 $(eval $(call BuildPackage,bind-dnssec))
163 $(eval $(call BuildPackage,bind-host))
164 $(eval $(call BuildPackage,bind-dig))