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