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