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
103 USERID
:=avahi
=105:avahi
=105
106 define Package
/avahi-daemon
/description
107 $(call Package
/avahi
/Default
/description
)
109 This package contains an mDNS
/DNS-SD daemon.
112 Package
/avahi-dbus-daemon
/description
=$(Package
/avahi-daemon
/description
)
113 Package
/avahi-nodbus-daemon
/description
=$(Package
/avahi-daemon
/description
)
115 define Package
/avahi-daemon
/conffiles
116 /etc
/avahi
/avahi-daemon.conf
119 Package
/avahi-dbus-daemon
/conffiles
=$(Package
/avahi-daemon
/conffiles
)
120 Package
/avahi-nodbus-daemon
/conffiles
=$(Package
/avahi-daemon
/conffiles
)
122 define Package
/avahi-daemon-service-http
123 $(call Package
/avahi
/Default
)
124 SUBMENU
:=IP Addresses and Names
125 DEPENDS
:=+avahi-daemon
126 TITLE
:=Announce HTTP service
129 define Package
/avahi-daemon-service-http
/description
130 $(call Package
/avahi
/Default
/description
)
132 This package contains the service definition for announcing HTTP service.
135 define Package
/avahi-daemon-service-http
/conffiles
136 /etc
/avahi
/services
/http.service
139 define Package
/avahi-daemon-service-ssh
140 $(call Package
/avahi
/Default
)
141 SUBMENU
:=IP Addresses and Names
142 DEPENDS
:=+avahi-daemon
143 TITLE
:=Announce SSH service
146 define Package
/avahi-daemon-service-ssh
/description
147 $(call Package
/avahi
/Default
/description
)
149 This package contains the service definition for announcing SSH service.
152 define Package
/avahi-daemon-service-ssh
/conffiles
153 /etc
/avahi
/services
/ssh.service
156 define Package
/avahi-dnsconfd
157 $(call Package
/avahi
/Default
)
158 SUBMENU
:=IP Addresses and Names
159 DEPENDS
:=+libavahi
+libdaemon
+libpthread
160 TITLE
:=A Unicast DNS server using avahi-daemon
163 define Package
/avahi-dnsconfd
/description
164 $(call Package
/avahi
/Default
/description
)
166 This package contains a Unicast DNS server from mDNS
/DNS-SD configuration
167 daemon
, which may be used to configure conventional DNS servers using mDNS
168 in a DHCP-like fashion. Especially useful on IPv6.
171 define Package
/libavahi-dbus-support
172 $(call Package
/libavahi
/Default
)
175 TITLE
+= (D-Bus support
)
178 define Package
/libavahi-nodbus-support
179 $(call Package
/libavahi
/Default
)
184 define Package
/libavahi-dbus-support
/description
185 $(call Package
/libavahi
/description
)
187 The libavahi-dbus-support package enables
188 D-Bus support in avahi
, needed to support
189 the libavahi-client library and avahi-utils.
191 Selecting this package modifies the build configuration
192 so that avahi packages are built with support for D-BUS enabled
;
193 it does not generate a separate binary of its own.
194 It also automatically adds the D-Bus package to the build.
195 libavahi-dbus-support is selected automatically if you select
196 libavahi-client or avahi-utils.
199 define Package
/libavahi-nodbus-support
/description
200 $(call Package
/libavahi
/description
)
202 Selecting this package modifies the build configuration
203 so that avahi packages are built without support for D-BUS enabled
;
204 it does not generate a separate binary of its own.
207 define Package
/libavahi-client
208 $(call Package
/avahi
/Default
)
212 DEPENDS
:=+avahi-dbus-daemon
213 TITLE
+= (libavahi-client library
)
216 define Package
/libavahi-client
/description
217 $(call Package
/avahi
/Default
/description
)
219 This packages adds the libavahi-client library.
220 It also automatically adds the required
221 libavahi-dbus-support and the avahi-dbus-daemon packages.
222 For more information please see the avahi documentation.
225 define Package
/libavahi-compat-libdnssd
226 $(call Package
/avahi
/Default
)
230 DEPENDS
:=+libavahi-client
234 define Package
/libavahi-compat-libdnssd
/description
235 $(call Package
/avahi
/Default
/description
)
237 This packages adds the libavahi-compat-libdnssd library.
238 It also automatically adds the required libavahi-client package.
239 For more information please see the avahi documentation.
242 define Package
/avahi-utils
243 $(call Package
/avahi
/Default
)
244 SUBMENU
:=IP Addresses and Names
246 DEPENDS
:=libavahi-client
+libgdbm
250 define Package
/avahi-utils
/description
251 $(call Package
/avahi
/Default
/description
)
253 This packages installs the following avahi utility programs
:
254 avahi-browse
, avahi-publish
, avahi-resolve
, avahi-set-host-name.
255 It also automatically adds the required libavahi-client package.
256 For more information please see the avahi documentation.
259 TARGET_CFLAGS
+= $(FPIC
) -DGETTEXT_PACKAGE
274 $(and
$(CONFIG_PACKAGE_libavahi-compat-libdnssd
),ifeq ($(BUILD_VARIANT
),dbus
),\
275 --enable-compat-libdns_sd
) \
278 --disable-python-dbus \
281 --disable-doxygen-doc \
282 --disable-doxygen-dot \
283 --disable-doxygen-man \
284 --disable-doxygen-rtf \
285 --disable-doxygen-xml \
286 --disable-doxygen-chm \
287 --disable-doxygen-chi \
288 --disable-doxygen-html \
289 --disable-doxygen-ps \
290 --disable-doxygen-pdf \
293 --with-avahi-user
=nobody \
294 --with-avahi-group
=nogroup \
295 --with-autoipd-user
=nobody \
296 --with-autoipd-group
=nogroup
298 ifneq ($(CONFIG_SSP_SUPPORT
),y
)
300 --disable-stack-protector
303 ifeq ($(BUILD_VARIANT
),dbus
)
312 CFLAGS
="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
313 ac_cv_header_sys_capability_h
=no \
315 define Build
/InstallDev
316 $(INSTALL_DIR
) $(1)/usr
/include
317 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
318 $(INSTALL_DIR
) $(1)/usr
/lib
319 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-
* $(1)/usr
/lib
/
320 ifeq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd
)-$(BUILD_VARIANT
),y-dbus
)
321 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdns_sd
* $(1)/usr
/lib
/
323 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
324 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* $(1)/usr
/lib
/pkgconfig
/
327 define Package
/libavahi
/install
328 $(INSTALL_DIR
) $(1)/usr
/lib
329 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-
{common
,core
}.so.
* $(1)/usr
/lib
/
332 define Package
/libavahi-dbus-support
/install
333 $(call Package
/libavahi
/install,$(1))
334 $(INSTALL_DIR
) $(1)/etc
/dbus-1
/system.d
335 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/dbus-1
/system.d
/* $(1)/etc
/dbus-1
/system.d
338 Package
/libavahi-nodbus-support
/install=$(Package
/libavahi
/install)
340 define Package
/libavahi-client
/install
341 $(INSTALL_DIR
) $(1)/usr
/lib
342 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-client.so.
* $(1)/usr
/lib
/
345 define Package
/libavahi-compat-libdnssd
/install
346 $(INSTALL_DIR
) $(1)/usr
/lib
347 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdns_sd.so.
* $(1)/usr
/lib
/
350 define Package
/avahi-utils
/install
351 $(INSTALL_DIR
) $(1)/usr
/bin
352 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
355 define Package
/avahi-autoipd
/install
356 $(INSTALL_DIR
) $(1)/etc
/avahi
357 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/etc
/avahi
/avahi-autoipd.action
$(1)/etc
/avahi
/
358 $(INSTALL_DIR
) $(1)/usr
/sbin
359 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-autoipd
$(1)/usr
/sbin
/
362 define Package
/avahi-daemon
/install
363 $(INSTALL_DIR
) $(1)/usr
/sbin
364 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-daemon
$(1)/usr
/sbin
/
365 $(INSTALL_DIR
) $(1)/etc
/avahi
366 $(INSTALL_DATA
) .
/files
/avahi-daemon.conf
$(1)/etc
/avahi
/
367 # install empty service directory so that user knows where
368 # to place custom service files
369 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
370 $(INSTALL_DIR
) $(1)/etc
/init.d
371 $(INSTALL_BIN
) .
/files
/avahi-daemon.init
$(1)/etc
/init.d
/avahi-daemon
374 Package
/avahi-dbus-daemon
/install=$(Package
/avahi-daemon
/install)
375 Package
/avahi-nodbus-daemon
/install=$(Package
/avahi-daemon
/install)
377 define Package
/avahi-daemon-service-http
/install
378 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
379 $(INSTALL_DATA
) .
/files
/service-http
$(1)/etc
/avahi
/services
/http.service
382 define Package
/avahi-daemon-service-ssh
/install
383 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
384 $(INSTALL_DATA
) .
/files
/service-ssh
$(1)/etc
/avahi
/services
/ssh.service
387 define Package
/avahi-dnsconfd
/install
388 $(INSTALL_DIR
) $(1)/etc
/avahi
389 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/etc
/avahi
/avahi-dnsconfd.action
$(1)/etc
/avahi
/
390 $(INSTALL_DIR
) $(1)/usr
/sbin
391 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-dnsconfd
$(1)/usr
/sbin
/
394 $(eval
$(call BuildPackage
,libavahi-client
))
395 $(eval
$(call BuildPackage
,libavahi-compat-libdnssd
))
396 $(eval
$(call BuildPackage
,avahi-utils
))
397 $(eval
$(call BuildPackage
,libavahi-dbus-support
))
398 $(eval
$(call BuildPackage
,libavahi-nodbus-support
))
399 $(eval
$(call BuildPackage
,avahi-autoipd
))
400 $(eval
$(call BuildPackage
,avahi-dbus-daemon
))
401 $(eval
$(call BuildPackage
,avahi-nodbus-daemon
))
402 $(eval
$(call BuildPackage
,avahi-daemon-service-http
))
403 $(eval
$(call BuildPackage
,avahi-daemon-service-ssh
))
404 $(eval
$(call BuildPackage
,avahi-dnsconfd
))