[packages] siproxd: fix linking against libltdl
[openwrt/svn-archive/archive.git] / net / bind / Makefile
1 #
2 # Copyright (C) 2006-2010 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.7.2-P2
12 PKG_RELEASE:=1
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:=e74de6ec9c2cd27576794c873bd85f4a
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:=DNS
31 endef
32
33 define Package/bind-libs
34 SECTION:=net
35 CATEGORY:=Network
36 TITLE:=bind shared libraries
37 URL:=http://www.isc.org/sw/bind/
38 SUBMENU:=DNS
39 endef
40
41 define Package/bind-server
42 $(call Package/bind/Default)
43 TITLE+= DNS server
44 endef
45
46 define Package/bind-client
47 $(call Package/bind/Default)
48 TITLE+= dynamic DNS client
49 endef
50
51 define Package/bind-tools
52 $(call Package/bind/Default)
53 TITLE+= administration tools (all)
54 endef
55
56 define Package/bind-rndc
57 $(call Package/bind/Default)
58 TITLE+= administration tools (rndc and rndc-confgen only)
59 endef
60
61 define Package/bind-check
62 $(call Package/bind/Default)
63 TITLE+= administration tools (named-checkconf and named-checkzone only)
64 endef
65
66 define Package/bind-dnssec
67 $(call Package/bind/Default)
68 TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
69 endef
70
71 define Package/bind-host
72 $(call Package/bind/Default)
73 TITLE+= simple DNS client
74 endef
75
76 define Package/bind-dig
77 $(call Package/bind/Default)
78 TITLE+= DNS excavation tool
79 endef
80
81 export BUILD_CC="$(TARGET_CC)"
82
83 CONFIGURE_ARGS += \
84 --enable-shared \
85 --enable-static \
86 --with-randomdev="/dev/urandom" \
87 --disable-threads \
88 --with-openssl="$(STAGING_DIR)/usr" \
89 --with-libtool \
90 --with-libxml2=no \
91 --enable-epoll=yes \
92
93 CONFIGURE_VARS += \
94 BUILD_CC="$(TARGET_CC)" \
95
96 define Build/Compile
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 all install
106 endef
107
108 define Package/bind-libs/install
109 $(INSTALL_DIR) $(1)/usr/lib
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
111 endef
112
113 define Package/bind-server/install
114 $(INSTALL_DIR) $(1)/usr/sbin
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
116 $(INSTALL_DIR) $(1)/etc
117 $(CP) ./files/bind $(1)/etc/
118 $(INSTALL_DIR) $(1)/etc/init.d
119 $(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
120 find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
121 endef
122
123 define Package/bind-client/install
124 $(INSTALL_DIR) $(1)/usr/bin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
126 endef
127
128 define Package/bind-tools/install
129 $(INSTALL_DIR) $(1)/usr/bin
130 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
131 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
132 $(INSTALL_DIR) $(1)/usr/sbin
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
136 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
139 endef
140
141 define Package/bind-rndc/install
142 $(INSTALL_DIR) $(1)/usr/sbin
143 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
144 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
145 endef
146
147 define Package/bind-check/install
148 $(INSTALL_DIR) $(1)/usr/sbin
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
151 endef
152
153 define Package/bind-dnssec/install
154 $(INSTALL_DIR) $(1)/usr/sbin
155 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
156 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
157 endef
158
159 define Package/bind-host/install
160 $(INSTALL_DIR) $(1)/usr/bin
161 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
162 endef
163
164 define Package/bind-dig/install
165 $(INSTALL_DIR) $(1)/usr/bin
166 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
167 endef
168
169 $(eval $(call BuildPackage,bind-libs))
170 $(eval $(call BuildPackage,bind-server))
171 $(eval $(call BuildPackage,bind-client))
172 $(eval $(call BuildPackage,bind-tools))
173 $(eval $(call BuildPackage,bind-rndc))
174 $(eval $(call BuildPackage,bind-check))
175 $(eval $(call BuildPackage,bind-dnssec))
176 $(eval $(call BuildPackage,bind-host))
177 $(eval $(call BuildPackage,bind-dig))