Merge pull request #3604 from danrl/jool
[feed/packages.git] / net / unbound / Makefile
1 #
2 # Copyright (C) 2010-2016 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.10
12 PKG_RELEASE:=6
13
14 PKG_LICENSE:=BSD-3-Clause
15 PKG_LICENSE_FILES:=LICENSE
16 PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@hotmail.com>
17
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=http://www.unbound.net/downloads
20 PKG_MD5SUM:=0a3a236811f1ab5c1dc31974fa74e047
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:=Unbound is a validating, recursive, and 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 USERID:=unbound=553:unbound=553
41 TITLE+= (daemon)
42 DEPENDS+= +libunbound
43 endef
44
45 define Package/unbound/description
46 This package contains the Unbound daemon.
47 endef
48
49 define Package/unbound-anchor
50 $(call Package/unbound/Default)
51 SECTION:=net
52 CATEGORY:=Network
53 SUBMENU:=IP Addresses and Names
54 TITLE+= (anchor utility)
55 DEPENDS+= +unbound +libexpat
56 endef
57
58 define Package/unbound-anchor/description
59 This package contains the Unbound anchor utility.
60 endef
61
62 define Package/unbound-control
63 $(call Package/unbound/Default)
64 SECTION:=net
65 CATEGORY:=Network
66 SUBMENU:=IP Addresses and Names
67 TITLE+= (control utility)
68 DEPENDS+= +unbound
69 endef
70
71 define Package/unbound-control/description
72 This package contains the Unbound control utility.
73 endef
74
75 define Package/unbound-control-setup
76 $(call Package/unbound/Default)
77 SECTION:=net
78 CATEGORY:=Network
79 SUBMENU:=IP Addresses and Names
80 TITLE+= (control setup utility)
81 DEPENDS+= +unbound-control +openssl-util
82 endef
83
84 define Package/unbound-control-setup/description
85 This package contains the Unbound control setup utility.
86 endef
87
88 define Package/unbound-host
89 $(call Package/unbound/Default)
90 SECTION:=net
91 CATEGORY:=Network
92 SUBMENU:=IP Addresses and Names
93 TITLE+= (DNS lookup utility)
94 DEPENDS+= +libunbound
95 endef
96
97 define Package/unbound-host/description
98 This package contains the Unbound DNS lookup utility.
99 endef
100
101 define Package/libunbound
102 $(call Package/unbound/Default)
103 SECTION:=libs
104 CATEGORY:=Libraries
105 TITLE+= (library)
106 DEPENDS+= +libpthread
107 endef
108
109 define Package/libunbound/description
110 This package contains the Unbound shared library.
111 endef
112
113 CONFIGURE_ARGS += \
114 --disable-dsa \
115 --disable-gost \
116 --enable-allsymbols \
117 --with-libexpat="$(STAGING_DIR)/usr" \
118 --with-ssl="$(STAGING_DIR)/usr" \
119 --with-pidfile=/var/run/unbound.pid \
120 --with-user=unbound
121
122 define Package/unbound/conffiles
123 /etc/config/unbound
124 /etc/unbound/unbound.conf
125 endef
126
127 define Build/InstallDev
128 $(INSTALL_DIR) $(1)/usr/include
129 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/
130 $(INSTALL_DIR) $(1)/usr/lib
131 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/
132 endef
133
134 define Package/unbound/install
135 $(INSTALL_DIR) $(1)/usr/sbin
136 $(INSTALL_BIN) \
137 $(PKG_INSTALL_DIR)/usr/sbin/unbound \
138 $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \
139 $(1)/usr/sbin/
140 $(INSTALL_DIR) $(1)/etc/unbound
141 $(INSTALL_DATA) \
142 $(PKG_INSTALL_DIR)/etc/unbound/unbound.conf \
143 $(1)/etc/unbound/unbound.conf
144 $(INSTALL_DATA) ./files/root.key $(1)/etc/unbound/root.key
145 $(INSTALL_DIR) $(1)/etc/config
146 $(INSTALL_DATA) ./files/unbound.uci $(1)/etc/config/unbound
147 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
148 $(INSTALL_BIN) ./files/unbound.iface $(1)/etc/hotplug.d/iface/25-unbound
149 $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp
150 $(INSTALL_BIN) ./files/unbound.ntpd $(1)/etc/hotplug.d/ntp/25-unbound
151 $(INSTALL_DIR) $(1)/etc/init.d
152 $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound
153 $(INSTALL_DIR) $(1)/usr/lib/unbound
154 $(INSTALL_DATA) ./files/dnsmasq.sh $(1)/usr/lib/unbound/dnsmasq.sh
155 $(INSTALL_DATA) ./files/iptools.sh $(1)/usr/lib/unbound/iptools.sh
156 $(INSTALL_DATA) ./files/rootzone.sh $(1)/usr/lib/unbound/rootzone.sh
157 $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh
158 endef
159
160 define Package/unbound-anchor/install
161 $(INSTALL_DIR) $(1)/usr/sbin
162 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/
163 endef
164
165 define Package/unbound-control/install
166 $(INSTALL_DIR) $(1)/usr/sbin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/
168 endef
169
170 define Package/unbound-control-setup/install
171 $(INSTALL_DIR) $(1)/usr/sbin
172 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup $(1)/usr/sbin/
173 endef
174
175 define Package/unbound-host/install
176 $(INSTALL_DIR) $(1)/usr/sbin
177 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/
178 endef
179
180 define Package/libunbound/install
181 $(INSTALL_DIR) $(1)/usr/lib
182 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/
183 endef
184
185 $(eval $(call BuildPackage,unbound))
186 $(eval $(call BuildPackage,unbound-anchor))
187 $(eval $(call BuildPackage,unbound-control))
188 $(eval $(call BuildPackage,unbound-control-setup))
189 $(eval $(call BuildPackage,unbound-host))
190 $(eval $(call BuildPackage,libunbound))