libvpx: update to 1.14.0
[feed/packages.git] / libs / avahi / Makefile
1 #
2 # Copyright (C) 2007-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:=avahi
11 PKG_VERSION:=0.8
12 PKG_RELEASE:=8
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
16 https://avahi.org/download
17 PKG_HASH:=060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
18
19 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=LICENSE
22 PKG_CPE_ID:=cpe:/a:avahi:avahi
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/avahi/Default
31 SECTION:=net
32 CATEGORY:=Network
33 TITLE:=An mDNS/DNS-SD implementation
34 URL:=http://www.avahi.org/
35 endef
36
37 define Package/avahi/Default/description
38 Avahi is an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf)
39 implementation (library). It facilitates
40 service discovery on a local network -- this means that
41 you can plug your laptop or computer into a network and
42 instantly be able to view other people who you can chat with,
43 find printers to print to or find files being shared.
44 This kind of technology is already found in MacOS X
45 (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
46 and is very convenient.
47 endef
48
49 define Package/libavahi/Default
50 $(call Package/avahi/Default)
51 SECTION:=libs
52 CATEGORY:=Libraries
53 PROVIDES:=libavahi
54 DEPENDS:=+libpthread
55 endef
56
57 define Package/libavahi/description
58 $(call Package/avahi/Default/description)
59 .
60 The libavahi package contains the mDNS/DNS-SD shared libraries,
61 used by other programs. Specifically, it provides
62 libavahi-core and libavahi-common libraries.
63 endef
64
65 define Package/avahi-autoipd
66 $(call Package/avahi/Default)
67 SUBMENU:=IP Addresses and Names
68 DEPENDS:=+libdaemon
69 TITLE:=IPv4LL network address configuration daemon
70 endef
71
72 define Package/avahi-autoipd/description
73 $(call Package/avahi/Default/description)
74 .
75 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
76 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
77 from the link-local 169.254.0.0/16 range without the need for a central
78 server. It is primarily intended to be used in ad-hoc networks which lack a
79 DHCP server.
80 endef
81
82 define Package/avahi-dbus-daemon
83 $(call Package/avahi/Default)
84 PROVIDES:=avahi-daemon
85 VARIANT:=dbus
86 SUBMENU:=IP Addresses and Names
87 DEPENDS:=+libavahi-dbus-support +libexpat +librt +libdaemon
88 TITLE+= (daemon)
89 endef
90
91 define Package/avahi-nodbus-daemon
92 $(call Package/avahi/Default)
93 PROVIDES:=avahi-daemon
94 VARIANT:=nodbus
95 SUBMENU:=IP Addresses and Names
96 DEPENDS:=+libavahi-nodbus-support +libexpat +librt +libdaemon
97 TITLE+= (daemon)
98 USERID:=avahi=105:avahi=105
99 endef
100
101 define Package/avahi-daemon/description
102 $(call Package/avahi/Default/description)
103 .
104 This package contains an mDNS/DNS-SD daemon.
105 endef
106
107 Package/avahi-dbus-daemon/description=$(Package/avahi-daemon/description)
108 Package/avahi-nodbus-daemon/description=$(Package/avahi-daemon/description)
109
110 define Package/avahi-daemon/conffiles
111 /etc/avahi/avahi-daemon.conf
112 endef
113
114 Package/avahi-dbus-daemon/conffiles=$(Package/avahi-daemon/conffiles)
115 Package/avahi-nodbus-daemon/conffiles=$(Package/avahi-daemon/conffiles)
116
117 define Package/avahi-daemon-service-http
118 $(call Package/avahi/Default)
119 SUBMENU:=IP Addresses and Names
120 DEPENDS:=+avahi-daemon
121 TITLE:=Announce HTTP service
122 endef
123
124 define Package/avahi-daemon-service-http/description
125 $(call Package/avahi/Default/description)
126 .
127 This package contains the service definition for announcing HTTP service.
128 endef
129
130 define Package/avahi-daemon-service-http/conffiles
131 /etc/avahi/services/http.service
132 endef
133
134 define Package/avahi-daemon-service-ssh
135 $(call Package/avahi/Default)
136 SUBMENU:=IP Addresses and Names
137 DEPENDS:=+avahi-daemon
138 TITLE:=Announce SSH service
139 endef
140
141 define Package/avahi-daemon-service-ssh/description
142 $(call Package/avahi/Default/description)
143 .
144 This package contains the service definition for announcing SSH service.
145 endef
146
147 define Package/avahi-daemon-service-ssh/conffiles
148 /etc/avahi/services/ssh.service
149 endef
150
151 define Package/avahi-dnsconfd
152 $(call Package/avahi/Default)
153 SUBMENU:=IP Addresses and Names
154 DEPENDS:=+libavahi +libdaemon +libpthread
155 TITLE:=A Unicast DNS server using avahi-daemon
156 endef
157
158 define Package/avahi-dnsconfd/description
159 $(call Package/avahi/Default/description)
160 .
161 This package contains a Unicast DNS server from mDNS/DNS-SD configuration
162 daemon, which may be used to configure conventional DNS servers using mDNS
163 in a DHCP-like fashion. Especially useful on IPv6.
164 endef
165
166 define Package/libavahi-dbus-support
167 $(call Package/libavahi/Default)
168 VARIANT:=dbus
169 DEPENDS:=+dbus
170 TITLE+= (D-Bus support)
171 endef
172
173 define Package/libavahi-nodbus-support
174 $(call Package/libavahi/Default)
175 VARIANT:=nodbus
176 TITLE+= (No D-Bus)
177 endef
178
179 define Package/libavahi-dbus-support/description
180 $(call Package/libavahi/description)
181 .
182 The libavahi-dbus-support package enables
183 D-Bus support in avahi, needed to support
184 the libavahi-client library and avahi-utils.
185 .
186 Selecting this package modifies the build configuration
187 so that avahi packages are built with support for D-BUS enabled;
188 it does not generate a separate binary of its own.
189 It also automatically adds the D-Bus package to the build.
190 libavahi-dbus-support is selected automatically if you select
191 libavahi-client or avahi-utils.
192 endef
193
194 define Package/libavahi-nodbus-support/description
195 $(call Package/libavahi/description)
196 .
197 Selecting this package modifies the build configuration
198 so that avahi packages are built without support for D-BUS enabled;
199 it does not generate a separate binary of its own.
200 endef
201
202 define Package/libavahi-client
203 $(call Package/avahi/Default)
204 SECTION:=libs
205 CATEGORY:=Libraries
206 VARIANT:=dbus
207 DEPENDS:=+avahi-dbus-daemon
208 TITLE+= (libavahi-client library)
209 endef
210
211 define Package/libavahi-client/description
212 $(call Package/avahi/Default/description)
213 .
214 This packages adds the libavahi-client library.
215 It also automatically adds the required
216 libavahi-dbus-support and the avahi-dbus-daemon packages.
217 For more information please see the avahi documentation.
218 endef
219
220 define Package/avahi-utils
221 $(call Package/avahi/Default)
222 SUBMENU:=IP Addresses and Names
223 VARIANT:=dbus
224 DEPENDS:=+libavahi-client +libgdbm
225 TITLE+= (utilities)
226 endef
227
228 define Package/avahi-utils/description
229 $(call Package/avahi/Default/description)
230 .
231 This packages installs the following avahi utility programs:
232 avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
233 It also automatically adds the required libavahi-client package.
234 For more information please see the avahi documentation.
235 endef
236
237 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
238
239 CONFIGURE_ARGS += \
240 --enable-shared \
241 --enable-static \
242 --disable-glib \
243 --disable-gobject \
244 --disable-introspection \
245 --disable-qt3 \
246 --disable-qt4 \
247 --disable-qt5 \
248 --disable-gtk \
249 --disable-gtk3 \
250 --disable-dbm \
251 --enable-gdbm \
252 --enable-libdaemon \
253 --disable-libevent \
254 --disable-python \
255 --disable-python-dbus \
256 --disable-mono \
257 --disable-monodoc \
258 --disable-doxygen-doc \
259 --disable-doxygen-dot \
260 --disable-doxygen-man \
261 --disable-doxygen-rtf \
262 --disable-doxygen-xml \
263 --disable-doxygen-chm \
264 --disable-doxygen-chi \
265 --disable-doxygen-html \
266 --disable-doxygen-ps \
267 --disable-doxygen-pdf \
268 --disable-manpages \
269 --disable-xmltoman \
270 --disable-tests \
271 --with-xml=expat \
272 --with-distro=none \
273 --with-avahi-user=nobody \
274 --with-avahi-group=nogroup \
275 --with-avahi-priv-access-group=nogroup \
276 --with-autoipd-user=nobody \
277 --with-autoipd-group=nogroup
278
279 ifeq ($(BUILD_VARIANT),dbus)
280 CONFIGURE_ARGS += \
281 --enable-dbus
282 else
283 CONFIGURE_ARGS += \
284 --disable-dbus
285 endif
286
287 CONFIGURE_VARS+= \
288 CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
289 ac_cv_header_sys_capability_h=no
290
291 define Build/InstallDev
292 $(INSTALL_DIR) $(1)/usr/include
293 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
294 $(INSTALL_DIR) $(1)/usr/lib
295 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
296 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
297 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
298 endef
299
300 define Package/libavahi/install
301 $(INSTALL_DIR) $(1)/usr/lib
302 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
303 endef
304
305 define Package/libavahi-dbus-support/install
306 $(call Package/libavahi/install,$(1))
307 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
308 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
309 endef
310
311 Package/libavahi-nodbus-support/install=$(Package/libavahi/install)
312
313 define Package/libavahi-client/install
314 $(INSTALL_DIR) $(1)/usr/lib
315 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
316 endef
317
318 define Package/avahi-utils/install
319 $(INSTALL_DIR) $(1)/usr/bin
320 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
321 endef
322
323 define Package/avahi-autoipd/install
324 $(INSTALL_DIR) $(1)/etc/avahi
325 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
326 $(INSTALL_DIR) $(1)/usr/sbin
327 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
328 $(INSTALL_DIR) $(1)/lib/netifd/proto
329 $(INSTALL_BIN) ./files/netifd-autoip.sh $(1)/lib/netifd/proto/autoip.sh
330 endef
331
332 define Package/avahi-daemon/install
333 $(INSTALL_DIR) $(1)/usr/sbin
334 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
335 $(INSTALL_DIR) $(1)/etc/avahi
336 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
337 # install empty service directory so that user knows where
338 # to place custom service files
339 $(INSTALL_DIR) $(1)/etc/avahi/services
340 $(INSTALL_DIR) $(1)/etc/init.d
341 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
342 endef
343
344 Package/avahi-dbus-daemon/install=$(Package/avahi-daemon/install)
345 Package/avahi-nodbus-daemon/install=$(Package/avahi-daemon/install)
346
347 define Package/avahi-daemon-service-http/install
348 $(INSTALL_DIR) $(1)/etc/avahi/services
349 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
350 endef
351
352 define Package/avahi-daemon-service-ssh/install
353 $(INSTALL_DIR) $(1)/etc/avahi/services
354 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
355 endef
356
357 define Package/avahi-dnsconfd/install
358 $(INSTALL_DIR) $(1)/etc/avahi
359 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
360 $(INSTALL_DIR) $(1)/usr/sbin
361 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
362 endef
363
364 $(eval $(call BuildPackage,libavahi-client))
365 $(eval $(call BuildPackage,avahi-utils))
366 $(eval $(call BuildPackage,libavahi-dbus-support))
367 $(eval $(call BuildPackage,libavahi-nodbus-support))
368 $(eval $(call BuildPackage,avahi-autoipd))
369 $(eval $(call BuildPackage,avahi-dbus-daemon))
370 $(eval $(call BuildPackage,avahi-nodbus-daemon))
371 $(eval $(call BuildPackage,avahi-daemon-service-http))
372 $(eval $(call BuildPackage,avahi-daemon-service-ssh))
373 $(eval $(call BuildPackage,avahi-dnsconfd))