[packages] memcached: update to 1.4.11 (#10804), add missing libpthread dependency...
[openwrt/svn-archive/archive.git] / net / unbound / Makefile
1 #
2 # Copyright (C) 2010-2011 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:=unbound
11 PKG_VERSION:=1.4.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.unbound.net/downloads
16 PKG_MD5SUM:=673a224c76345003fd168448ca12fbb2
17
18 PKG_BUILD_DEPENDS:=libexpat
19 PKG_BUILD_PARALLEL:=1
20 PKG_FIXUP:=libtool
21 PKG_INSTALL:=1
22 PKG_LIBTOOL_PATHS:= ./libtool ./ldns-src/libtool
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/unbound/Default
27 TITLE:=A validating, recursive & caching DNS resolver
28 URL:=http://www.unbound.net/
29 DEPENDS:=+libldns
30 endef
31
32 define Package/unbound
33 $(call Package/unbound/Default)
34 SECTION:=net
35 CATEGORY:=Network
36 SUBMENU:=IP Addresses and Names
37 TITLE+= (daemon)
38 DEPENDS+= +libunbound
39 endef
40
41 define Package/unbound/description
42 This package contains the Unbound daemon.
43 endef
44
45 define Package/unbound-anchor
46 $(call Package/unbound/Default)
47 SECTION:=net
48 CATEGORY:=Network
49 SUBMENU:=IP Addresses and Names
50 TITLE+= (anchor utility)
51 DEPENDS+= +unbound +libexpat
52 endef
53
54 define Package/unbound-anchor/description
55 This package contains the Unbound anchor utility.
56 endef
57
58 define Package/unbound-control
59 $(call Package/unbound/Default)
60 SECTION:=net
61 CATEGORY:=Network
62 SUBMENU:=IP Addresses and Names
63 TITLE+= (control utility)
64 DEPENDS+= +unbound
65 endef
66
67 define Package/unbound-control/description
68 This package contains the Unbound control utility.
69 endef
70
71 define Package/unbound-control-setup
72 $(call Package/unbound/Default)
73 SECTION:=net
74 CATEGORY:=Network
75 SUBMENU:=IP Addresses and Names
76 TITLE+= (control setup utility)
77 DEPENDS+= +unbound-control +openssl-util
78 endef
79
80 define Package/unbound-control-setup/description
81 This package contains the Unbound control setup utility.
82 endef
83
84 define Package/unbound-host
85 $(call Package/unbound/Default)
86 SECTION:=net
87 CATEGORY:=Network
88 SUBMENU:=IP Addresses and Names
89 TITLE+= (DNS lookup utility)
90 DEPENDS+= +libunbound
91 endef
92
93 define Package/unbound-host/description
94 This package contains the Unbound DNS lookup utility.
95 endef
96
97 define Package/libunbound
98 $(call Package/unbound/Default)
99 SECTION:=libs
100 CATEGORY:=Libraries
101 TITLE+= (library)
102 endef
103
104 define Package/libunbound/description
105 This package contains the Unbound shared library.
106 endef
107
108 CONFIGURE_ARGS += \
109 --disable-gost \
110 --enable-allsymbols \
111 --with-ldns="$(STAGING_DIR)/usr" \
112 --with-libexpat="$(STAGING_DIR)/usr" \
113 --with-ssl="$(STAGING_DIR)/usr" \
114 --without-pthreads
115
116 define Package/unbound/conffiles
117 /etc/unbound/unbound.conf
118 endef
119
120 define Build/InstallDev
121 $(INSTALL_DIR) $(1)/usr/include
122 $(CP) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
123 $(INSTALL_DIR) $(1)/usr/lib
124 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
125 endef
126
127 define Package/unbound/install
128 $(INSTALL_DIR) $(1)/usr/sbin
129 $(CP) \
130 $(PKG_INSTALL_DIR)/usr/sbin/unbound \
131 $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
132 $(1)/usr/sbin/
133 $(INSTALL_DIR) $(1)/etc/unbound
134 $(INSTALL_CONF) \
135 $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
136 $(1)/etc/unbound/
137 $(INSTALL_CONF) ./files/root.key $(1)/etc/unbound/
138 $(INSTALL_CONF) ./files/named.cache $(1)/etc/unbound/
139 $(INSTALL_DIR) $(1)/etc/init.d
140 $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
141 endef
142
143 define Package/unbound-anchor/install
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
146 endef
147
148 define Package/unbound-control/install
149 $(INSTALL_DIR) $(1)/usr/sbin
150 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
151 endef
152
153 define Package/unbound-control-setup/install
154 $(INSTALL_DIR) $(1)/usr/sbin
155 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
156 endef
157
158 define Package/unbound-host/install
159 $(INSTALL_DIR) $(1)/usr/sbin
160 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
161 endef
162
163 define Package/libunbound/install
164 $(INSTALL_DIR) $(1)/usr/lib
165 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
166 endef
167
168 $(eval $(call BuildPackage,unbound))
169 $(eval $(call BuildPackage,unbound-anchor))
170 $(eval $(call BuildPackage,unbound-control))
171 $(eval $(call BuildPackage,unbound-control-setup))
172 $(eval $(call BuildPackage,unbound-host))
173 $(eval $(call BuildPackage,libunbound))