Add ezxml (#4362), thanks Raphael
[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.5.0-P1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= \
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:=a4f9dd6d205d24ec89fa4e44d8188197
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/bind/Default
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+bind-libs +libopenssl
27 TITLE:=bind
28 URL:=http://www.isc.org/sw/bind/
29 SUBMENU:=DNS
30 endef
31
32 define Package/bind-libs
33 SECTION:=net
34 CATEGORY:=Network
35 TITLE:=bind shared libraries
36 URL:=http://www.isc.org/sw/bind/
37 SUBMENU:=DNS
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 --enable-ipv6 \
86 --with-randomdev="/dev/urandom" \
87 --disable-threads \
88 --with-openssl="$(STAGING_DIR)/usr" \
89 --with-libtool \
90 --with-libxml2=no \
91 , \
92 BUILD_CC="$(TARGET_CC)" \
93
94 define Build/Compile
95 rm -rf $(PKG_INSTALL_DIR)
96 mkdir -p $(PKG_INSTALL_DIR)
97 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
98 BUILD_CC="$(HOSTCC)" \
99 CC="$(HOSTCC)" \
100 CFLAGS="-O2" \
101 LIBS="" \
102 gen
103 $(MAKE) -C $(PKG_BUILD_DIR) \
104 DESTDIR="$(PKG_INSTALL_DIR)" \
105 DESTDIR="$(PKG_INSTALL_DIR)" \
106 all install
107 endef
108
109 define Package/bind-libs/install
110 $(INSTALL_DIR) $(1)/usr/lib
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
112 endef
113
114 define Package/bind-server/install
115 $(INSTALL_DIR) $(1)/usr/sbin
116 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
117 $(INSTALL_DIR) $(1)/etc
118 $(CP) ./files/bind $(1)/etc/
119 $(INSTALL_DIR) $(1)/etc/init.d
120 $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
121 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
122 endef
123
124 define Package/bind-client/install
125 $(INSTALL_DIR) $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
127 endef
128
129 define Package/bind-tools/install
130 $(INSTALL_DIR) $(1)/usr/bin
131 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
132 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
133 $(INSTALL_DIR) $(1)/usr/sbin
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
136 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
140 endef
141
142 define Package/bind-rndc/install
143 $(INSTALL_DIR) $(1)/usr/sbin
144 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
146 endef
147
148 define Package/bind-check/install
149 $(INSTALL_DIR) $(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 endef
153
154 define Package/bind-dnssec/install
155 $(INSTALL_DIR) $(1)/usr/sbin
156 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
157 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
158 endef
159
160 define Package/bind-host/install
161 $(INSTALL_DIR) $(1)/usr/bin
162 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
163 endef
164
165 define Package/bind-dig/install
166 $(INSTALL_DIR) $(1)/usr/bin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
168 endef
169
170 $(eval $(call BuildPackage,bind-libs))
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))