fix xorg-server compile
[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.4.1
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:=09b54d35036cb0423b2e618f21766285
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 , \
94 BUILD_CC="$(TARGET_CC)" \
95
96 define Build/Compile
97 rm -rf $(PKG_INSTALL_DIR)
98 mkdir -p $(PKG_INSTALL_DIR)
99 $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
100 BUILD_CC="$(HOSTCC)" \
101 CC="$(HOSTCC)" \
102 CFLAGS="-O2" \
103 LIBS="" \
104 gen
105 $(MAKE) -C $(PKG_BUILD_DIR) \
106 DESTDIR="$(PKG_INSTALL_DIR)" \
107 DESTDIR="$(PKG_INSTALL_DIR)" \
108 all install
109 endef
110
111 define Package/bind-libs/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
114 endef
115
116 define Package/bind-server/install
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
119 $(INSTALL_DIR) $(1)/etc
120 $(CP) ./files/bind $(1)/etc/
121 $(INSTALL_DIR) $(1)/etc/init.d
122 $(CP) ./files/named.init $(1)/etc/init.d/named
123 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
124 endef
125
126 define Package/bind-client/install
127 $(INSTALL_DIR) $(1)/usr/bin
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
129 endef
130
131 define Package/bind-tools/install
132 $(INSTALL_DIR) $(1)/usr/bin
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
135 $(INSTALL_DIR) $(1)/usr/sbin
136 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
142 endef
143
144 define Package/bind-rndc/install
145 $(INSTALL_DIR) $(1)/usr/sbin
146 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
148 endef
149
150 define Package/bind-check/install
151 $(INSTALL_DIR) $(1)/usr/sbin
152 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
154 endef
155
156 define Package/bind-dnssec/install
157 $(INSTALL_DIR) $(1)/usr/sbin
158 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
159 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
160 endef
161
162 define Package/bind-host/install
163 $(INSTALL_DIR) $(1)/usr/bin
164 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
165 endef
166
167 define Package/bind-dig/install
168 $(INSTALL_DIR) $(1)/usr/bin
169 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
170 endef
171
172 $(eval $(call BuildPackage,bind-libs))
173 $(eval $(call BuildPackage,bind-server))
174 $(eval $(call BuildPackage,bind-client))
175 $(eval $(call BuildPackage,bind-tools))
176 $(eval $(call BuildPackage,bind-rndc))
177 $(eval $(call BuildPackage,bind-check))
178 $(eval $(call BuildPackage,bind-dnssec))
179 $(eval $(call BuildPackage,bind-host))
180 $(eval $(call BuildPackage,bind-dig))