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:=a4f9dd6d205d24ec89fa4e44d8188197
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24 include $(INCLUDE_DIR)/package.mk
26 define Package/bind/Default
29 DEPENDS:=+bind-libs +libopenssl
31 URL:=http://www.isc.org/sw/bind/
35 define Package/bind-libs
38 TITLE:=bind shared libraries
39 URL:=http://www.isc.org/sw/bind/
43 define Package/bind-server
44 $(call Package/bind/Default)
48 define Package/bind-client
49 $(call Package/bind/Default)
50 TITLE+= dynamic DNS client
53 define Package/bind-tools
54 $(call Package/bind/Default)
55 TITLE+= administration tools (all)
58 define Package/bind-rndc
59 $(call Package/bind/Default)
60 TITLE+= administration tools (rndc and rndc-confgen only)
63 define Package/bind-check
64 $(call Package/bind/Default)
65 TITLE+= administration tools (named-checkconf and named-checkzone only)
68 define Package/bind-dnssec
69 $(call Package/bind/Default)
70 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
73 define Package/bind-host
74 $(call Package/bind/Default)
75 TITLE+= simple DNS client
78 define Package/bind-dig
79 $(call Package/bind/Default)
80 TITLE+= DNS excavation tool
83 export BUILD_CC="$(TARGET_CC)"
89 --with-randomdev="/dev/urandom" \
91 --with-openssl="$(STAGING_DIR)/usr" \
95 BUILD_CC="$(TARGET_CC)" \
98 rm -rf $(PKG_INSTALL_DIR)
99 mkdir -p $(PKG_INSTALL_DIR)
100 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
101 BUILD_CC="$(HOSTCC)" \
106 $(MAKE) -C $(PKG_BUILD_DIR) \
107 DESTDIR="$(PKG_INSTALL_DIR)" \
108 DESTDIR="$(PKG_INSTALL_DIR)" \
112 define Package/bind-libs/install
113 $(INSTALL_DIR) $(1)/usr/lib
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
117 define Package/bind-server/install
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
120 $(INSTALL_DIR) $(1)/etc
121 $(CP) ./files/bind $(1)/etc/
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
124 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
127 define Package/bind-client/install
128 $(INSTALL_DIR) $(1)/usr/bin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
132 define Package/bind-tools/install
133 $(INSTALL_DIR) $(1)/usr/bin
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
145 define Package/bind-rndc/install
146 $(INSTALL_DIR) $(1)/usr/sbin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
151 define Package/bind-check/install
152 $(INSTALL_DIR) $(1)/usr/sbin
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
154 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
157 define Package/bind-dnssec/install
158 $(INSTALL_DIR) $(1)/usr/sbin
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
160 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
163 define Package/bind-host/install
164 $(INSTALL_DIR) $(1)/usr/bin
165 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
168 define Package/bind-dig/install
169 $(INSTALL_DIR) $(1)/usr/bin
170 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
173 $(eval $(call BuildPackage,bind-libs))
174 $(eval $(call BuildPackage,bind-server))
175 $(eval $(call BuildPackage,bind-client))
176 $(eval $(call BuildPackage,bind-tools))
177 $(eval $(call BuildPackage,bind-rndc))
178 $(eval $(call BuildPackage,bind-check))
179 $(eval $(call BuildPackage,bind-dnssec))
180 $(eval $(call BuildPackage,bind-host))
181 $(eval $(call BuildPackage,bind-dig))