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
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
34 URL:=http://www.isc.org/sw/bind/
38 define Package/bind-libs
41 TITLE:=bind shared libraries
42 URL:=http://www.isc.org/sw/bind/
46 define Package/bind-server
47 $(call Package/bind/Default)
51 define Package/bind-client
52 $(call Package/bind/Default)
53 TITLE+= dynamic DNS client
56 define Package/bind-tools
57 $(call Package/bind/Default)
58 TITLE+= administration tools (all)
61 define Package/bind-rndc
62 $(call Package/bind/Default)
63 TITLE+= administration tools (rndc and rndc-confgen only)
66 define Package/bind-check
67 $(call Package/bind/Default)
68 TITLE+= administration tools (named-checkconf and named-checkzone only)
71 define Package/bind-dnssec
72 $(call Package/bind/Default)
73 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
76 define Package/bind-host
77 $(call Package/bind/Default)
78 TITLE+= simple DNS client
81 define Package/bind-dig
82 $(call Package/bind/Default)
83 TITLE+= DNS excavation tool
86 export BUILD_CC="$(TARGET_CC)"
92 --with-randomdev="/dev/urandom" \
94 --with-openssl="$(STAGING_DIR)/usr" \
97 BUILD_CC="$(TARGET_CC)" \
100 rm -rf $(PKG_INSTALL_DIR)
101 mkdir -p $(PKG_INSTALL_DIR)
102 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
103 BUILD_CC="$(HOSTCC)" \
108 $(MAKE) -C $(PKG_BUILD_DIR) \
109 DESTDIR="$(PKG_INSTALL_DIR)" \
110 DESTDIR="$(PKG_INSTALL_DIR)" \
114 define Package/bind-libs/install
115 $(INSTALL_DIR) $(1)/usr/lib
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
119 define Package/bind-server/install
120 $(INSTALL_DIR) $(1)/usr/sbin
121 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
122 $(INSTALL_DIR) $(1)/etc
123 $(CP) ./files/bind $(1)/etc/
124 $(INSTALL_DIR) $(1)/etc/init.d
125 $(CP) ./files/named.init $(1)/etc/init.d/named
126 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
129 define Package/bind-client/install
130 $(INSTALL_DIR) $(1)/usr/bin
131 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
134 define Package/bind-tools/install
135 $(INSTALL_DIR) $(1)/usr/bin
136 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
137 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
138 $(INSTALL_DIR) $(1)/usr/sbin
139 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
140 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
141 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
142 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
143 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
144 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
147 define Package/bind-rndc/install
148 $(INSTALL_DIR) $(1)/usr/sbin
149 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
150 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
153 define Package/bind-check/install
154 $(INSTALL_DIR) $(1)/usr/sbin
155 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
156 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
159 define Package/bind-dnssec/install
160 $(INSTALL_DIR) $(1)/usr/sbin
161 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
162 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
165 define Package/bind-host/install
166 $(INSTALL_DIR) $(1)/usr/bin
167 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
170 define Package/bind-dig/install
171 $(INSTALL_DIR) $(1)/usr/bin
172 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
175 $(eval $(call BuildPackage,bind-libs))
176 $(eval $(call BuildPackage,bind-server))
177 $(eval $(call BuildPackage,bind-client))
178 $(eval $(call BuildPackage,bind-tools))
179 $(eval $(call BuildPackage,bind-rndc))
180 $(eval $(call BuildPackage,bind-check))
181 $(eval $(call BuildPackage,bind-dnssec))
182 $(eval $(call BuildPackage,bind-host))
183 $(eval $(call BuildPackage,bind-dig))