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