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
16 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION)/
17 PKG_MD5SUM:=a0b86647ef6a2d5f1e759112d08e2229
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 PKG_BUILDDEP:=libopenssl
25 include $(INCLUDE_DIR)/package.mk
27 define Package/bind/Default
31 URL:=http://www.isc.org/sw/bind/
34 define Package/bind-server
35 $(call Package/bind/Default)
39 define Package/bind-client
40 $(call Package/bind/Default)
41 TITLE+= dynamic DNS client
44 define Package/bind-tools
45 $(call Package/bind/Default)
46 TITLE+= administration tools (all)
49 define Package/bind-rndc
50 $(call Package/bind/Default)
51 TITLE+= administration tools (rndc and rndc-confgen only)
54 define Package/bind-check
55 $(call Package/bind/Default)
56 TITLE+= administration tools (named-checkconf and named-checkzone only)
59 define Package/bind-dnssec
60 $(call Package/bind/Default)
61 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
64 define Package/bind-host
65 $(call Package/bind/Default)
66 TITLE+= simple DNS client
69 define Package/bind-dig
70 $(call Package/bind/Default)
71 TITLE+= DNS excavation tool
74 define Package/Build/Configure
75 $(call Build/Configure/Default,\
79 --with-randomdev="/dev/urandom" \
81 --with-openssl="$(STAGING_DIR)/usr" \
87 rm -rf $(PKG_INSTALL_DIR)
88 mkdir -p $(PKG_INSTALL_DIR)
89 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 DESTDIR="$(PKG_INSTALL_DIR)" \
98 define Package/bind-server/install
99 install -d -m0755 $(1)/usr/sbin
100 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
101 install -d -m0755 $(1)/etc
102 $(CP) ./files/bind $(1)/etc/
103 install -d -m0755 $(1)/etc/init.d
104 $(CP) ./files/named.init $(1)/etc/init.d/named
105 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
108 define Package/bind-client/install
109 install -d -m0755 $(1)/usr/bin
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
113 define Package/bind-tools/install
114 install -d -m0755 $(1)/usr/bin
115 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
116 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
117 install -d -m0755 $(1)/usr/sbin
118 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
119 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
120 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
121 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
122 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
123 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
126 define Package/bind-rndc/install
127 install -d -m0755 $(1)/usr/sbin
128 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
129 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
132 define Package/bind-check/install
133 install -d -m0755 $(1)/usr/sbin
134 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
135 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
138 define Package/bind-dnssec/install
139 install -d -m0755 $(1)/usr/sbin
140 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
141 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
144 define Package/bind-host/install
145 install -d -m0755 $(1)/usr/bin
146 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
149 define Package/bind-dig/install
150 install -d -m0755 $(1)/usr/bin
151 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
154 $(eval $(call BuildPackage,bind-server))
155 $(eval $(call BuildPackage,bind-client))
156 $(eval $(call BuildPackage,bind-tools))
157 $(eval $(call BuildPackage,bind-rndc))
158 $(eval $(call BuildPackage,bind-check))
159 $(eval $(call BuildPackage,bind-dnssec))
160 $(eval $(call BuildPackage,bind-host))
161 $(eval $(call BuildPackage,bind-dig))