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:=09b54d35036cb0423b2e618f21766285
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24 PKG_BUILD_DEPENDS:=libopenssl
26 include $(INCLUDE_DIR)/package.mk
28 define Package/bind/Default
33 URL:=http://www.isc.org/sw/bind/
37 define Package/bind-libs
40 TITLE:=bind shared libraries
41 URL:=http://www.isc.org/sw/bind/
45 define Package/bind-server
46 $(call Package/bind/Default)
50 define Package/bind-client
51 $(call Package/bind/Default)
52 TITLE+= dynamic DNS client
55 define Package/bind-tools
56 $(call Package/bind/Default)
57 TITLE+= administration tools (all)
60 define Package/bind-rndc
61 $(call Package/bind/Default)
62 TITLE+= administration tools (rndc and rndc-confgen only)
65 define Package/bind-check
66 $(call Package/bind/Default)
67 TITLE+= administration tools (named-checkconf and named-checkzone only)
70 define Package/bind-dnssec
71 $(call Package/bind/Default)
72 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
75 define Package/bind-host
76 $(call Package/bind/Default)
77 TITLE+= simple DNS client
80 define Package/bind-dig
81 $(call Package/bind/Default)
82 TITLE+= DNS excavation tool
85 export BUILD_CC="$(TARGET_CC)"
91 --with-randomdev="/dev/urandom" \
93 --with-openssl="$(STAGING_DIR)/usr" \
96 BUILD_CC="$(TARGET_CC)" \
99 rm -rf $(PKG_INSTALL_DIR)
100 mkdir -p $(PKG_INSTALL_DIR)
101 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
102 BUILD_CC="$(HOSTCC)" \
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 DESTDIR="$(PKG_INSTALL_DIR)" \
109 DESTDIR="$(PKG_INSTALL_DIR)" \
113 define Package/bind-libs/install
114 $(INSTALL_DIR) $(1)/usr/lib
115 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
118 define Package/bind-server/install
119 $(INSTALL_DIR) $(1)/usr/sbin
120 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
121 $(INSTALL_DIR) $(1)/etc
122 $(CP) ./files/bind $(1)/etc/
123 $(INSTALL_DIR) $(1)/etc/init.d
124 $(CP) ./files/named.init $(1)/etc/init.d/named
125 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
128 define Package/bind-client/install
129 $(INSTALL_DIR) $(1)/usr/bin
130 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
133 define Package/bind-tools/install
134 $(INSTALL_DIR) $(1)/usr/bin
135 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
136 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
137 $(INSTALL_DIR) $(1)/usr/sbin
138 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
139 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
140 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
141 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
142 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
143 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
146 define Package/bind-rndc/install
147 $(INSTALL_DIR) $(1)/usr/sbin
148 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
149 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
152 define Package/bind-check/install
153 $(INSTALL_DIR) $(1)/usr/sbin
154 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
155 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
158 define Package/bind-dnssec/install
159 $(INSTALL_DIR) $(1)/usr/sbin
160 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
161 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
164 define Package/bind-host/install
165 $(INSTALL_DIR) $(1)/usr/bin
166 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
169 define Package/bind-dig/install
170 $(INSTALL_DIR) $(1)/usr/bin
171 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
174 $(eval $(call BuildPackage,bind-libs))
175 $(eval $(call BuildPackage,bind-server))
176 $(eval $(call BuildPackage,bind-client))
177 $(eval $(call BuildPackage,bind-tools))
178 $(eval $(call BuildPackage,bind-rndc))
179 $(eval $(call BuildPackage,bind-check))
180 $(eval $(call BuildPackage,bind-dnssec))
181 $(eval $(call BuildPackage,bind-host))
182 $(eval $(call BuildPackage,bind-dig))