2 # Copyright (C) 2007-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
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
>
19 PKG_BUILD_DEPENDS
:=libexpat libdaemon libgdbm intltool
/host libpthread dbus
22 PKG_REMOVE_FILES
:=autogen.sh
27 ifeq ($(BUILD_VARIANT
),dbus
)
28 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/dbus
/$(PKG_NAME
)-$(PKG_VERSION
)
30 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/nodbus
/$(PKG_NAME
)-$(PKG_VERSION
)
33 include $(INCLUDE_DIR
)/package.mk
35 define Package
/avahi
/Default
38 TITLE
:=An mDNS
/DNS-SD implementation
39 URL
:=http
://www.avahi.org
/
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.
54 define Package
/libavahi
/Default
55 $(call Package
/avahi
/Default
)
62 define Package
/libavahi
/description
63 $(call Package
/avahi
/Default
/description
)
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.
70 define Package
/avahi-autoipd
71 $(call Package
/avahi
/Default
)
72 SUBMENU
:=IP Addresses and Names
74 TITLE
:=IPv4LL network address configuration daemon
77 define Package
/avahi-autoipd
/description
78 $(call Package
/avahi
/Default
/description
)
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
87 define Package
/avahi-dbus-daemon
88 $(call Package
/avahi
/Default
)
89 PROVIDES
:=avahi-daemon
91 SUBMENU
:=IP Addresses and Names
92 DEPENDS
:=+libavahi-dbus-support
+libexpat
+librt
+libdaemon
96 define Package
/avahi-nodbus-daemon
97 $(call Package
/avahi
/Default
)
98 PROVIDES
:=avahi-daemon
100 SUBMENU
:=IP Addresses and Names
101 DEPENDS
:=+libavahi-nodbus-support
+libexpat
+librt
+libdaemon
105 define Package
/avahi-daemon
/description
106 $(call Package
/avahi
/Default
/description
)
108 This package contains an mDNS
/DNS-SD daemon.
111 Package
/avahi-dbus-daemon
/description
=$(Package
/avahi-daemon
/description
)
112 Package
/avahi-nodbus-daemon
/description
=$(Package
/avahi-daemon
/description
)
114 define Package
/avahi-daemon
/conffiles
115 /etc
/avahi
/avahi-daemon.conf
118 Package
/avahi-dbus-daemon
/conffiles
=$(Package
/avahi-daemon
/conffiles
)
119 Package
/avahi-nodbus-daemon
/conffiles
=$(Package
/avahi-daemon
/conffiles
)
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
128 define Package
/avahi-daemon-service-http
/description
129 $(call Package
/avahi
/Default
/description
)
131 This package contains the service definition for announcing HTTP service.
134 define Package
/avahi-daemon-service-http
/conffiles
135 /etc
/avahi
/services
/http.service
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
145 define Package
/avahi-daemon-service-ssh
/description
146 $(call Package
/avahi
/Default
/description
)
148 This package contains the service definition for announcing SSH service.
151 define Package
/avahi-daemon-service-ssh
/conffiles
152 /etc
/avahi
/services
/ssh.service
155 define Package
/avahi-dnsconfd
156 $(call Package
/avahi
/Default
)
157 SUBMENU
:=IP Addresses and Names
158 DEPENDS
:=+libavahi
+libdaemon
+libpthread
159 TITLE
:=A Unicast DNS server using avahi-daemon
162 define Package
/avahi-dnsconfd
/description
163 $(call Package
/avahi
/Default
/description
)
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.
170 define Package
/libavahi-dbus-support
171 $(call Package
/libavahi
/Default
)
174 TITLE
+= (D-Bus support
)
177 define Package
/libavahi-nodbus-support
178 $(call Package
/libavahi
/Default
)
183 define Package
/libavahi-dbus-support
/description
184 $(call Package
/libavahi
/description
)
186 The libavahi-dbus-support package enables
187 D-Bus support in avahi
, needed to support
188 the libavahi-client library and avahi-utils.
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.
198 define Package
/libavahi-nodbus-support
/description
199 $(call Package
/libavahi
/description
)
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.
206 define Package
/libavahi-client
207 $(call Package
/avahi
/Default
)
211 DEPENDS
:=+avahi-dbus-daemon
212 TITLE
+= (libavahi-client library
)
215 define Package
/libavahi-client
/description
216 $(call Package
/avahi
/Default
/description
)
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.
224 define Package
/libavahi-compat-libdnssd
225 $(call Package
/avahi
/Default
)
229 DEPENDS
:=+libavahi-client
233 define Package
/libavahi-compat-libdnssd
/description
234 $(call Package
/avahi
/Default
/description
)
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.
241 define Package
/avahi-utils
242 $(call Package
/avahi
/Default
)
243 SUBMENU
:=IP Addresses and Names
245 DEPENDS
:=libavahi-client
+libgdbm
249 define Package
/avahi-utils
/description
250 $(call Package
/avahi
/Default
/description
)
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.
258 TARGET_CFLAGS
+= $(FPIC
) -DGETTEXT_PACKAGE
273 $(and
$(CONFIG_PACKAGE_libavahi-compat-libdnssd
),ifeq ($(BUILD_VARIANT
),dbus
),\
274 --enable-compat-libdns_sd
) \
277 --disable-python-dbus \
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 \
292 --with-avahi-user
=nobody \
293 --with-avahi-group
=nogroup \
294 --with-autoipd-user
=nobody \
295 --with-autoipd-group
=nogroup
297 ifneq ($(CONFIG_SSP_SUPPORT
),y
)
299 --disable-stack-protector
302 ifeq ($(BUILD_VARIANT
),dbus
)
311 CFLAGS
="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
312 ac_cv_header_sys_capability_h
=no \
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
/
322 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
323 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* $(1)/usr
/lib
/pkgconfig
/
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
/
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
337 Package
/libavahi-nodbus-support
/install=$(Package
/libavahi
/install)
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
/
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
/
349 define Package
/avahi-utils
/install
350 $(INSTALL_DIR
) $(1)/usr
/bin
351 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
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
/
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
373 Package
/avahi-dbus-daemon
/install=$(Package
/avahi-daemon
/install)
374 Package
/avahi-nodbus-daemon
/install=$(Package
/avahi-daemon
/install)
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
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
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
/
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
))