dbd5f9a32b35e31202898c05c582191888233bee
[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 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/bind/Default
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+bind-libs +libopenssl
30 TITLE:=bind
31 URL:=http://www.isc.org/sw/bind/
32 SUBMENU:=DNS
33 endef
34
35 define Package/bind-libs
36 SECTION:=net
37 CATEGORY:=Network
38 TITLE:=bind shared libraries
39 URL:=http://www.isc.org/sw/bind/
40 SUBMENU:=DNS
41 endef
42
43 define Package/bind-server
44 $(call Package/bind/Default)
45 TITLE+= DNS server
46 endef
47
48 define Package/bind-client
49 $(call Package/bind/Default)
50 TITLE+= dynamic DNS client
51 endef
52
53 define Package/bind-tools
54 $(call Package/bind/Default)
55 TITLE+= administration tools (all)
56 endef
57
58 define Package/bind-rndc
59 $(call Package/bind/Default)
60 TITLE+= administration tools (rndc and rndc-confgen only)
61 endef
62
63 define Package/bind-check
64 $(call Package/bind/Default)
65 TITLE+= administration tools (named-checkconf and named-checkzone only)
66 endef
67
68 define Package/bind-dnssec
69 $(call Package/bind/Default)
70 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
71 endef
72
73 define Package/bind-host
74 $(call Package/bind/Default)
75 TITLE+= simple DNS client
76 endef
77
78 define Package/bind-dig
79 $(call Package/bind/Default)
80 TITLE+= DNS excavation tool
81 endef
82
83 export BUILD_CC="$(TARGET_CC)"
84
85 CONFIGURE_ARGS += \
86 --enable-shared \
87 --enable-static \
88 --enable-ipv6 \
89 --with-randomdev="/dev/urandom" \
90 --disable-threads \
91 --with-openssl="$(STAGING_DIR)/usr" \
92 --with-libtool \
93 --with-libxml2=no \
94 , \
95 BUILD_CC="$(TARGET_CC)" \
96
97 define Build/Compile
98 rm -rf $(PKG_INSTALL_DIR)
99 mkdir -p $(PKG_INSTALL_DIR)
100 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
101 BUILD_CC="$(HOSTCC)" \
102 CC="$(HOSTCC)" \
103 CFLAGS="-O2" \
104 LIBS="" \
105 gen
106 $(MAKE) -C $(PKG_BUILD_DIR) \
107 DESTDIR="$(PKG_INSTALL_DIR)" \
108 DESTDIR="$(PKG_INSTALL_DIR)" \
109 all install
110 endef
111
112 define Package/bind-libs/install
113 $(INSTALL_DIR) $(1)/usr/lib
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
115 endef
116
117 define Package/bind-server/install
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
120 $(INSTALL_DIR) $(1)/etc
121 $(CP) ./files/bind $(1)/etc/
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
124 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
125 endef
126
127 define Package/bind-client/install
128 $(INSTALL_DIR) $(1)/usr/bin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
130 endef
131
132 define Package/bind-tools/install
133 $(INSTALL_DIR) $(1)/usr/bin
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
143 endef
144
145 define Package/bind-rndc/install
146 $(INSTALL_DIR) $(1)/usr/sbin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
149 endef
150
151 define Package/bind-check/install
152 $(INSTALL_DIR) $(1)/usr/sbin
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
154 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
155 endef
156
157 define Package/bind-dnssec/install
158 $(INSTALL_DIR) $(1)/usr/sbin
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
160 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
161 endef
162
163 define Package/bind-host/install
164 $(INSTALL_DIR) $(1)/usr/bin
165 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
166 endef
167
168 define Package/bind-dig/install
169 $(INSTALL_DIR) $(1)/usr/bin
170 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
171 endef
172
173 $(eval $(call BuildPackage,bind-libs))
174 $(eval $(call BuildPackage,bind-server))
175 $(eval $(call BuildPackage,bind-client))
176 $(eval $(call BuildPackage,bind-tools))
177 $(eval $(call BuildPackage,bind-rndc))
178 $(eval $(call BuildPackage,bind-check))
179 $(eval $(call BuildPackage,bind-dnssec))
180 $(eval $(call BuildPackage,bind-host))
181 $(eval $(call BuildPackage,bind-dig))