[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[packages.git] / net / unbound / Makefile
1 #
2 # Copyright (C) 2010-2012 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.17
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:=812d49064a78c92765970a1364736da7
17
18 PKG_BUILD_DEPENDS:=libexpat
19 PKG_BUILD_PARALLEL:=1
20 PKG_FIXUP:=autoreconf
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/unbound/Default
26   TITLE:=A validating, recursive & caching DNS resolver
27   URL:=http://www.unbound.net/
28   DEPENDS:=+libldns
29 endef
30
31 define Package/unbound
32   $(call Package/unbound/Default)
33   SECTION:=net
34   CATEGORY:=Network
35   SUBMENU:=IP Addresses and Names
36   TITLE+= (daemon)
37   DEPENDS+= +libunbound
38 endef
39
40 define Package/unbound/description
41   This package contains the Unbound daemon.
42 endef
43
44 define Package/unbound-anchor
45   $(call Package/unbound/Default)
46   SECTION:=net
47   CATEGORY:=Network
48   SUBMENU:=IP Addresses and Names
49   TITLE+= (anchor utility)
50   DEPENDS+= +unbound +libexpat
51 endef
52
53 define Package/unbound-anchor/description
54   This package contains the Unbound anchor utility.
55 endef
56
57 define Package/unbound-control
58   $(call Package/unbound/Default)
59   SECTION:=net
60   CATEGORY:=Network
61   SUBMENU:=IP Addresses and Names
62   TITLE+= (control utility)
63   DEPENDS+= +unbound
64 endef
65
66 define Package/unbound-control/description
67   This package contains the Unbound control utility.
68 endef
69
70 define Package/unbound-control-setup
71   $(call Package/unbound/Default)
72   SECTION:=net
73   CATEGORY:=Network
74   SUBMENU:=IP Addresses and Names
75   TITLE+= (control setup utility)
76   DEPENDS+= +unbound-control +openssl-util
77 endef
78
79 define Package/unbound-control-setup/description
80   This package contains the Unbound control setup utility.
81 endef
82
83 define Package/unbound-host
84   $(call Package/unbound/Default)
85   SECTION:=net
86   CATEGORY:=Network
87   SUBMENU:=IP Addresses and Names
88   TITLE+= (DNS lookup utility)
89   DEPENDS+= +libunbound
90 endef
91
92 define Package/unbound-host/description
93   This package contains the Unbound DNS lookup utility.
94 endef
95
96 define Package/libunbound
97   $(call Package/unbound/Default)
98   SECTION:=libs
99   CATEGORY:=Libraries
100   TITLE+= (library)
101 endef
102
103 define Package/libunbound/description
104   This package contains the Unbound shared library.
105 endef
106
107 CONFIGURE_ARGS += \
108         --disable-ecdsa \
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))