f547befbcabe1de444ae29d811c5d7a670c3e0aa
[openwrt/svn-archive/archive.git] / net / bind / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bind
11 PKG_VERSION:=9.8.0-P4
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:= \
16 ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
17 http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
18 PKG_MD5SUM:=13e36e3f28dc1ce7675b45a4192e8389
19
20 PKG_FIXUP:=libtool
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/bind/Default
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+bind-libs +libopenssl
28 TITLE:=bind
29 URL:=https://www.isc.org/software/bind
30 SUBMENU:=IP Addresses and Names
31 endef
32
33 define Package/bind-libs
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE:=bind shared libraries
37 URL:=http://www.isc.org/sw/bind/
38 endef
39
40 define Package/bind-server
41 $(call Package/bind/Default)
42 TITLE+= DNS server
43 endef
44
45 define Package/bind-client
46 $(call Package/bind/Default)
47 TITLE+= dynamic DNS client
48 endef
49
50 define Package/bind-tools
51 $(call Package/bind/Default)
52 TITLE+= administration tools (all)
53 endef
54
55 define Package/bind-rndc
56 $(call Package/bind/Default)
57 TITLE+= administration tools (rndc and rndc-confgen only)
58 endef
59
60 define Package/bind-check
61 $(call Package/bind/Default)
62 TITLE+= administration tools (named-checkconf and named-checkzone only)
63 endef
64
65 define Package/bind-dnssec
66 $(call Package/bind/Default)
67 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
68 endef
69
70 define Package/bind-host
71 $(call Package/bind/Default)
72 TITLE+= simple DNS client
73 endef
74
75 define Package/bind-dig
76 $(call Package/bind/Default)
77 TITLE+= DNS excavation tool
78 endef
79
80 export BUILD_CC="$(TARGET_CC)"
81
82 CONFIGURE_ARGS += \
83 --enable-shared \
84 --enable-static \
85 --with-randomdev="/dev/urandom" \
86 --disable-threads \
87 --with-openssl="$(STAGING_DIR)/usr" \
88 --with-libtool \
89 --with-libxml2=no \
90 --enable-epoll=yes \
91
92 CONFIGURE_VARS += \
93 BUILD_CC="$(TARGET_CC)" \
94
95 define Build/Compile
96 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
97 BUILD_CC="$(HOSTCC)" \
98 CC="$(HOSTCC)" \
99 CFLAGS="-O2" \
100 LIBS="" \
101 gen
102 $(MAKE) -C $(PKG_BUILD_DIR) \
103 DESTDIR="$(PKG_INSTALL_DIR)" \
104 all install
105 endef
106
107 define Package/bind-libs/install
108 $(INSTALL_DIR) $(1)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
110 endef
111
112 define Package/bind-server/install
113 $(INSTALL_DIR) $(1)/usr/sbin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
115 $(INSTALL_DIR) $(1)/etc/bind
116 $(CP) \
117 ./files/bind/db.0 \
118 ./files/bind/db.127 \
119 ./files/bind/db.255 \
120 ./files/bind/db.local \
121 ./files/bind/db.root \
122 $(1)/etc/bind/
123 $(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
124 $(INSTALL_DIR) $(1)/etc/init.d
125 $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
126 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
127 endef
128
129 define Package/bind-server/conffiles
130 /etc/bind/db.0
131 /etc/bind/db.127
132 /etc/bind/db.255
133 /etc/bind/db.local
134 /etc/bind/db.root
135 /etc/bind/named.conf
136 endef
137
138 define Package/bind-client/install
139 $(INSTALL_DIR) $(1)/usr/bin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
141 endef
142
143 define Package/bind-tools/install
144 $(INSTALL_DIR) $(1)/usr/bin
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
146 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
147 $(INSTALL_DIR) $(1)/usr/sbin
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
151 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
152 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
154 endef
155
156 define Package/bind-rndc/install
157 $(INSTALL_DIR) $(1)/usr/sbin
158 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
160 endef
161
162 define Package/bind-check/install
163 $(INSTALL_DIR) $(1)/usr/sbin
164 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
165 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
166 endef
167
168 define Package/bind-dnssec/install
169 $(INSTALL_DIR) $(1)/usr/sbin
170 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
171 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
172 endef
173
174 define Package/bind-host/install
175 $(INSTALL_DIR) $(1)/usr/bin
176 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
177 endef
178
179 define Package/bind-dig/install
180 $(INSTALL_DIR) $(1)/usr/bin
181 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
182 endef
183
184 $(eval $(call BuildPackage,bind-libs))
185 $(eval $(call BuildPackage,bind-server))
186 $(eval $(call BuildPackage,bind-client))
187 $(eval $(call BuildPackage,bind-tools))
188 $(eval $(call BuildPackage,bind-rndc))
189 $(eval $(call BuildPackage,bind-check))
190 $(eval $(call BuildPackage,bind-dnssec))
191 $(eval $(call BuildPackage,bind-host))
192 $(eval $(call BuildPackage,bind-dig))