2 # Copyright (C) 2007-2014 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
10 ifeq ($(BUILD_VARIANT
),dbus
)
11 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/dbus
/$(PKG_NAME
)-$(PKG_VERSION
)
12 PKG_ALT_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/nodbus
/$(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/nodbus
/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_ALT_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)/dbus
/$(PKG_NAME
)-$(PKG_VERSION
)
24 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
25 PKG_SOURCE_URL
:=http
://avahi.org
/download
/
26 PKG_MD5SUM
:=2f22745b8f7368ad5a0a3fddac343f2d
27 PKG_MAINTAINER
:=Ted Hess
<thess@kitschensync.net
>
29 PKG_BUILD_DEPENDS
:=libexpat libdaemon libgdbm intltool
/host libpthread dbus
32 PKG_REMOVE_FILES
:=autogen.sh
39 include $(INCLUDE_DIR
)/package.mk
41 define Package
/avahi
/Default
44 TITLE
:=An mDNS
/DNS-SD implementation
45 URL
:=http
://www.avahi.org
/
48 define Package
/avahi
/Default
/description
49 Avahi is an mDNS
/DNS-SD
(aka RendezVous
/Bonjour
/ZeroConf
)
50 implementation
(library
). It facilitates
51 service discovery on a local network
-- this means that
52 you can plug your laptop or computer into a network and
53 instantly be able to view other people who you can chat with
,
54 find printers to
print to or find files being shared.
55 This kind of technology is already found in MacOS X
56 (branded
'Rendezvous', 'Bonjour' and sometimes
'ZeroConf')
57 and is very convenient.
60 define Package
/libavahi
61 $(call Package
/avahi
/Default
)
64 DEPENDS
:=+libpthread
+SSP_SUPPORT
:libssp
68 define Package
/libavahi
/description
69 $(call Package
/avahi
/Default
/description
)
71 The libavahi package contains the mDNS
/DNS-SD shared libraries
,
72 used by other programs. Specifically
, it provides
73 libavahi-core and libavahi-common libraries.
74 By default
, it is built without D-Bus support
,
75 i.e. the
--disable-dbus configuration flag is set.
76 To enable D-Bus support
, select the package
77 libavahi-dbus-support.
80 define Package
/avahi-autoipd
81 $(call Package
/avahi
/Default
)
82 SUBMENU
:=IP Addresses and Names
84 TITLE
:=IPv4LL network address configuration daemon
87 define Package
/avahi-autoipd
/description
88 $(call Package
/avahi
/Default
/description
)
90 This package implements IPv4LL
, "Dynamic Configuration of IPv4 Link-Local
91 Addresses" (IETF RFC3927
), a protocol for automatic IP address configuration
92 from the link-local
169.254.0.0/16 range without the need for a central
93 server. It is primarily intended to be used in ad-hoc networks which lack a
97 define Package
/avahi-daemon
98 $(call Package
/avahi
/Default
)
99 SUBMENU
:=IP Addresses and Names
100 ifeq ($(BUILD_VARIANT
),dbus
)
101 DEPENDS
:=+libavahi
+libexpat
+librt
+libdaemon
+libdbus
103 DEPENDS
:=+libavahi
+libexpat
+librt
+libdaemon
109 define Package
/avahi-daemon
/description
110 $(call Package
/avahi
/Default
/description
)
112 This package contains an mDNS
/DNS-SD daemon.
115 define Package
/avahi-daemon
/conffiles
116 /etc
/avahi
/avahi-daemon.conf
119 define Package
/avahi-daemon-service-http
120 $(call Package
/avahi
/Default
)
121 SUBMENU
:=IP Addresses and Names
122 DEPENDS
:=avahi-daemon
123 TITLE
:=Announce HTTP service
126 define Package
/avahi-daemon-service-http
/description
127 $(call Package
/avahi
/Default
/description
)
129 This package contains the service definition for announcing HTTP service.
132 define Package
/avahi-daemon-service-http
/conffiles
133 /etc
/avahi
/services
/http.service
136 define Package
/avahi-daemon-service-ssh
137 $(call Package
/avahi
/Default
)
138 SUBMENU
:=IP Addresses and Names
139 DEPENDS
:=avahi-daemon
140 TITLE
:=Announce SSH service
143 define Package
/avahi-daemon-service-ssh
/description
144 $(call Package
/avahi
/Default
/description
)
146 This package contains the service definition for announcing SSH service.
149 define Package
/avahi-daemon-service-ssh
/conffiles
150 /etc
/avahi
/services
/ssh.service
153 define Package
/avahi-dnsconfd
154 $(call Package
/avahi
/Default
)
155 SUBMENU
:=IP Addresses and Names
156 DEPENDS
:=+libavahi
+libdaemon
157 TITLE
:=A Unicast DNS server from mDNS
/DNS-SD configuration daemon
160 define Package
/avahi-dnsconfd
/description
161 $(call Package
/avahi
/Default
/description
)
163 This package contains a Unicast DNS server from mDNS
/DNS-SD configuration
164 daemon
, which may be used to configure conventional DNS servers using mDNS
165 in a DHCP-like fashion. Especially useful on IPv6.
168 define Package
/libavahi-dbus-support
169 $(call Package
/avahi
/Default
)
173 DEPENDS
:=+dbus
+libavahi
174 TITLE
+= (D-Bus support
)
177 define Package
/libavahi-dbus-support
/description
178 $(call Package
/libavahi
/description
)
180 The libavahi-dbus-support package enables
181 D-Bus support in avahi
, needed to support
182 the libavahi-client library and avahi-utils.
183 Selecting this package modifies the build configuration
184 so that avahi packages are built with support for D-BUS enabled
;
185 it does not generate a separate binary of its own.
186 It also automatically adds the D-Bus package to the build.
187 libavahi-dbus-support is selected automatically if you select
188 libavahi-client or avahi-utils.
191 define Package
/libavahi-client
192 $(call Package
/avahi
/Default
)
195 DEPENDS
:=+libavahi-dbus-support
+avahi-daemon
196 TITLE
+= (libavahi-client library
)
199 define Package
/libavahi-client
/description
200 $(call Package
/avahi
/Default
/description
)
202 This packages adds the libavahi-client library.
203 It also automatically adds the required
204 libavahi-dbus-support and the avahi-daemon packages.
205 For more information please see the avahi documentation.
208 define Package
/libavahi-compat-libdnssd
209 $(call Package
/avahi
/Default
)
212 DEPENDS
:=+libavahi-client
216 define Package
/libavahi-compat-libdnssd
/description
217 $(call Package
/avahi
/Default
/description
)
219 This packages adds the libavahi-compat-libdnssd library.
220 It also automatically adds the required libavahi-client package.
221 For more information please see the avahi documentation.
224 define Package
/avahi-utils
225 $(call Package
/avahi
/Default
)
226 SUBMENU
:=IP Addresses and Names
227 DEPENDS
:=+libavahi-client
+libgdbm
231 define Package
/avahi-utils
/description
232 $(call Package
/avahi
/Default
/description
)
234 This packages installs the following avahi utility programs
:
235 avahi-browse
, avahi-publish
, avahi-resolve
, avahi-set-host-name.
236 It also automatically adds the required libavahi-client package.
237 For more information please see the avahi documentation.
240 TARGET_CFLAGS
+= $(FPIC
) -DGETTEXT_PACKAGE
255 $(if
$(CONFIG_PACKAGE_libavahi-compat-libdnssd
),--enable-compat-libdns_sd
) \
258 --disable-python-dbus \
261 --disable-doxygen-doc \
262 --disable-doxygen-dot \
263 --disable-doxygen-man \
264 --disable-doxygen-rtf \
265 --disable-doxygen-xml \
266 --disable-doxygen-chm \
267 --disable-doxygen-chi \
268 --disable-doxygen-html \
269 --disable-doxygen-ps \
270 --disable-doxygen-pdf \
273 --with-avahi-user
=nobody \
274 --with-avahi-group
=nogroup \
275 --with-autoipd-user
=nobody \
276 --with-autoipd-group
=nogroup
278 ifneq ($(CONFIG_SSP_SUPPORT
),y
)
280 --disable-stack-protector
283 ifeq ($(BUILD_VARIANT
),dbus
)
292 CFLAGS
="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
293 ac_cv_header_sys_capability_h
=no \
295 define Build
/InstallDev
296 $(INSTALL_DIR
) $(1)/usr
/include
297 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
298 $(INSTALL_DIR
) $(1)/usr
/lib
299 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-
* $(1)/usr
/lib
/
300 ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd
),)
301 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdns_sd
* $(1)/usr
/lib
/
303 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
304 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* $(1)/usr
/lib
/pkgconfig
/
307 define Package
/libavahi-dbus-support
/install
308 $(INSTALL_DIR
) $(1)/etc
/dbus-1
/system.d
309 $(CP
) $(PKG_INSTALL_DIR
)/etc
/dbus-1
/system.d
/* $(1)/etc
/dbus-1
/system.d
312 define Package
/libavahi
/install
313 # The next line removes the ".build" file from the "other" build.
314 # The effect is that, if the other build is re-selected in the future,
315 # the build system will be forced to replace all the code in the
316 # installer packages, removing anything from the current build.
317 # "Other" means this: if the current build is "dbus", the other is "nodebus",
318 # and if the current build is "nodbus", the other is "dbus".
319 $(RM
) -f
$(PKG_ALT_DIR
)/.built
320 $(INSTALL_DIR
) $(1)/usr
/lib
321 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-
{common
,core
}.so.
* $(1)/usr
/lib
/
324 define Package
/libavahi-client
/install
325 $(INSTALL_DIR
) $(1)/usr
/lib
326 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libavahi-client.so.
* $(1)/usr
/lib
/
329 define Package
/libavahi-compat-libdnssd
/install
330 $(INSTALL_DIR
) $(1)/usr
/lib
331 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdns_sd.so.
* $(1)/usr
/lib
/
334 define Package
/avahi-utils
/install
335 $(INSTALL_DIR
) $(1)/usr
/bin
336 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
339 define Package
/avahi-autoipd
/install
340 $(INSTALL_DIR
) $(1)/etc
/avahi
341 $(CP
) $(PKG_INSTALL_DIR
)/etc
/avahi
/avahi-autoipd.action
$(1)/etc
/avahi
/
342 $(INSTALL_DIR
) $(1)/usr
/sbin
343 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-autoipd
$(1)/usr
/sbin
/
346 define Package
/avahi-daemon
/install
347 $(INSTALL_DIR
) $(1)/usr
/sbin
348 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-daemon
$(1)/usr
/sbin
/
349 $(INSTALL_DIR
) $(1)/etc
/avahi
350 $(INSTALL_DATA
) .
/files
/avahi-daemon.conf
$(1)/etc
/avahi
/
351 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
352 $(INSTALL_DATA
) .
/files
/service-http
$(1)/etc
/avahi
/services
/http.service
353 $(INSTALL_DATA
) .
/files
/service-ssh
$(1)/etc
/avahi
/services
/ssh.service
354 $(INSTALL_DIR
) $(1)/etc
/init.d
355 $(INSTALL_BIN
) .
/files
/avahi-daemon.init
$(1)/etc
/init.d
/avahi-daemon
358 define Package
/avahi-daemon-service-http
/install
359 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
360 $(INSTALL_DATA
) .
/files
/service-http
$(1)/etc
/avahi
/services
/http.service
363 define Package
/avahi-daemon-service-ssh
/install
364 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
365 $(INSTALL_DATA
) .
/files
/service-ssh
$(1)/etc
/avahi
/services
/ssh.service
368 define Package
/avahi-dnsconfd
/install
369 $(INSTALL_DIR
) $(1)/etc
/avahi
370 $(CP
) $(PKG_INSTALL_DIR
)/etc
/avahi
/avahi-dnsconfd.action
$(1)/etc
/avahi
/
371 $(INSTALL_DIR
) $(1)/usr
/sbin
372 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/avahi-dnsconfd
$(1)/usr
/sbin
/
375 $(eval
$(call BuildPackage
,libavahi-client
))
376 $(eval
$(call BuildPackage
,libavahi-compat-libdnssd
))
377 $(eval
$(call BuildPackage
,avahi-utils
))
378 $(eval
$(call BuildPackage
,libavahi-dbus-support
))
379 $(eval
$(call BuildPackage
,libavahi
))
380 $(eval
$(call BuildPackage
,avahi-autoipd
))
381 $(eval
$(call BuildPackage
,avahi-daemon
))
382 $(eval
$(call BuildPackage
,avahi-daemon-service-http
))
383 $(eval
$(call BuildPackage
,avahi-daemon-service-ssh
))
384 $(eval
$(call BuildPackage
,avahi-dnsconfd
))