d006b7b31306244fd793c38fcc054b288e351bfb
[openwrt/svn-archive/archive.git] / net / bind / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=bind
12 PKG_VERSION:=9.3.2-P1
13 PKG_RELEASE:=8
14 PKG_MD5SUM:=a0b86647ef6a2d5f1e759112d08e2229
15
16 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION)/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/bind
26 SECTION:=net
27 CATEGORY:=Network
28 SUBMENU:=ISC's DNS suite implementation
29 DEPENDS:=+libopenssl
30 TITLE:=ISC's DNS suite implementation
31 DESCRIPTION:=ISC's DNS suite implementation
32 URL:=http://www.isc.org/sw/bind/
33 endef
34
35 define Package/bind-server
36 $(call Package/bind)
37 DEFAULT:=m if ALL
38 TITLE:=ISC's DNS server implementation
39 DESCRIPTION:=ISC's DNS server implementation
40 endef
41
42 define Package/bind-client
43 $(call Package/bind)
44 DEFAULT:=m if ALL
45 TITLE:=A dynamic DNS client
46 DESCRIPTION:=A dynamic DNS client
47 endef
48
49 define Package/bind-tools
50 $(call Package/bind)
51 DEFAULT:=m if ALL
52 TITLE:=Bind administration tools
53 DESCRIPTION:=A DNS client
54 endef
55
56 define Package/bind-rndc
57 $(call Package/bind)
58 DEFAULT:=m if ALL
59 TITLE:=bind administration tools (rndc and rndc-confgen only)
60 DESCRIPTION:=bind administration tools (rndc and rndc-confgen only)
61 endef
62
63 define Package/bind-check
64 $(call Package/bind)
65 DEFAULT:=m if ALL
66 TITLE:=bind administration tools (named-checkconf and named-checkzone only)
67 DESCRIPTION:=bind administration tools (named-checkconf and named-checkzone only)
68 endef
69
70 define Package/bind-dnssec
71 $(call Package/bind)
72 DEFAULT:=m if ALL
73 TITLE:=Bind administration tools (dnssec-keygen and dnssec-signzone only)
74 DESCRIPTION:=Bind administration tools (dnssec-keygen and dnssec-signzone only)
75 endef
76
77 define Package/bind-host
78 $(call Package/bind)
79 DEFAULT:=m if ALL
80 TITLE:=A simple DNS client
81 DESCRIPTION:=A simple DNS client
82 endef
83
84 define Package/bind-dig
85 $(call Package/bind)
86 DEFAULT:=m if ALL
87 TITLE:=A DNS client
88 DESCRIPTION:=A DNS client
89 endef
90
91 define Package/Build/Configure
92 $(call Build/Configure/Default,\
93 --enable-shared \
94 --enable-static \
95 --enable-ipv6 \
96 --with-randomdev=/dev/urandom \
97 --disable-threads \
98 --with-openssl=$(STAGING_DIR)/usr/ \
99 --with-libtool \
100 --with-gnu-ld \
101 )
102 endef
103
104 define Build/Compile
105 rm -rf $(PKG_INSTALL_DIR)
106 mkdir -p $(PKG_INSTALL_DIR)
107 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
108 CC="$(HOSTCC)" \
109 CFLAGS="-O2" \
110 gen
111 $(MAKE) -C $(PKG_BUILD_DIR) \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 all install
114 endef
115
116 define Package/bind-server/install
117 install -d -m0755 $(1)/usr/sbin
118 install -d -m0755 $(1)/etc/init.d
119 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
120 $(CP) files/bind $(1)/etc
121 $(CP) files/named.init $(1)/etc/init.d/named
122 find $(1)/etc/bind -name ".svn" | xargs rm -rf
123 endef
124
125 define Package/bind-client/install
126 install -d -m0755 $(1)/usr/bin
127 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
128 endef
129
130 define Package/bind-tools/install
131 install -d -m0755 $(1)/usr/bin
132 install -d -m0755 $(1)/usr/sbin
133 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
134 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
135 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
136 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(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/
139 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
140 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
141 endef
142
143 define Package/bind-rndc/install
144 install -d -m0755 $(1)/usr/sbin
145 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
146 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
147 endef
148
149 define Package/bind-check/install
150 install -d -m0755 $(1)/usr/sbin
151 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
152 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
153 endef
154
155 define Package/bind-dnssec/install
156 install -d -m0755 $(1)/usr/sbin
157 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
158 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
159 endef
160
161 define Package/bind-host/install
162 install -d -m0755 $(1)/usr/bin
163 $(CP) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
164 endef
165
166 define Package/bind-dig/install
167 install -d -m0755 $(1)/usr/bin
168 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
169 endef
170
171 $(eval $(call BuildPackage,bind-server))
172 $(eval $(call BuildPackage,bind-client))
173 $(eval $(call BuildPackage,bind-tools))
174 $(eval $(call BuildPackage,bind-rndc))
175 $(eval $(call BuildPackage,bind-check))
176 $(eval $(call BuildPackage,bind-dnssec))
177 $(eval $(call BuildPackage,bind-host))
178 $(eval $(call BuildPackage,bind-dig))