2 # Copyright (C) 2007-2011 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:=e4db89a2a403ff4c47d66ac66fad1f43
18 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread
23 PKG_REMOVE_FILES:=autogen.sh
28 include $(INCLUDE_DIR)/package.mk
30 define Package/avahi/Default
34 URL:=http://www.avahi.org/
37 define Package/avahi/Default/description
38 An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
39 Avahi is a system which facilitates service discovery on a local network --
40 this means that you can plug your laptop or computer into a network and
41 instantly be able to view other people who you can chat with, find printers
42 to print to or find files being shared. This kind of technology is already
43 found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
44 and is very convenient.
47 define Package/libavahi
48 $(call Package/avahi/Default)
51 DEPENDS:=+libdaemon +libpthread +libgdbm
56 define Package/libavahi-dbus
57 $(call Package/avahi/Default)
60 DEPENDS:=+libdaemon +libpthread +libgdbm +dbus @!LINUX_2_4
61 TITLE+= (library) (dbus)
65 define Package/libavahi/description
66 $(call Package/avahi/Default/description)
68 This package contains the mDNS/DNS-SD shared libraries, used by other programs.
69 Specifically, it provides libavahi-core and libavahi-common libraries.
70 This version is compiled without D-Bus support, i.e. the --disable-dbus
71 compilation flag is set.
74 define Package/libavahi-dbus/description
75 $(call Package/avahi/Default/description)
77 This package contains the mDNS/DNS-SD shared libraries, used by other programs.
78 Specifically, it provides libavahi-core and libavahi-common libraries.
79 This version is compiled with D-Bus support
82 define Package/avahi-autoipd
83 $(call Package/avahi/Default)
84 SUBMENU:=IP Addresses and Names
86 TITLE:=IPv4LL address conf daemon
90 define Package/avahi-autoipd-dbus
91 $(call Package/avahi/Default)
92 SUBMENU:=IP Addresses and Names
94 TITLE:=IPv4LL address conf daemon (dbus)
98 define Package/avahi-autoipd/description
99 $(call Package/avahi/Default/description)
101 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
102 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
103 from the link-local 169.254.0.0/16 range without the need for a central
104 server. It is primarily intended to be used in ad-hoc networks which lack a
107 This verison is compile along with non-D-Bus version of libavahi.
110 define Package/avahi-autoipd-dbus/description
111 $(call Package/avahi/Default/description)
113 This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local
114 Addresses" (IETF RFC3927), a protocol for automatic IP address configuration
115 from the link-local 169.254.0.0/16 range without the need for a central
116 server. It is primarily intended to be used in ad-hoc networks which lack a
119 This version is compiled along with the D-Bus version of libavahi.
122 define Package/avahi-daemon
123 $(call Package/avahi/Default)
124 SUBMENU:=IP Addresses and Names
125 DEPENDS:=+libavahi +libexpat
130 define Package/avahi-daemon-dbus
131 $(call Package/avahi/Default)
132 SUBMENU:=IP Addresses and Names
133 DEPENDS:=+libavahi-dbus +libexpat
134 TITLE+= (daemon) (dbus)
138 define Package/avahi-daemon/description
139 $(call Package/avahi/Default/description)
141 This package contains an mDNS/DNS-SD daemon.
144 define Package/avahi-daemon-dbus/description
145 $(call Package/avahi/Default/description)
147 This package contains an mDNS/DNS-SD daemon with dbus support.
150 define Package/avahi-daemon/conffiles
151 /etc/avahi/avahi-daemon.conf
152 /etc/avahi/services/http.service
153 /etc/avahi/services/ssh.service
156 define Package/avahi-daemon-dbus/conffiles
157 /etc/avahi/avahi-daemon.conf
158 /etc/avahi/services/http.service
159 /etc/avahi/services/ssh.service
162 define Package/avahi-dnsconfd
163 $(call Package/avahi/Default)
164 SUBMENU:=IP Addresses and Names
166 TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
170 define Package/avahi-dnsconfd-dbus
171 $(call Package/avahi/Default)
172 SUBMENU:=IP Addresses and Names
173 DEPENDS:=+libavahi-dbus
174 TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon with dbus support
178 define Package/avahi-dnsconfd/description
179 $(call Package/avahi/Default/description)
181 This package contains a Unicast DNS server from mDNS/DNS-SD configuration
182 daemon, which may be used to configure conventional DNS servers using mDNS
183 in a DHCP-like fashion. Especially useful on IPv6.
185 This version does not have D-Bus support.
188 define Package/avahi-dnsconfd-dbus/description
189 $(call Package/avahi/Default/description)
191 This package contains a Unicast DNS server from mDNS/DNS-SD configuration
192 daemon, which may be used to configure conventional DNS servers using mDNS
193 in a DHCP-like fashion. Especially useful on IPv6.
195 This version has D-Bus support.
198 define Package/libavahi-client
199 $(call Package/avahi/Default)
202 DEPENDS:=+libavahi-dbus
203 TITLE+= (libavahi-client library)
207 define Package/libavahi-client/description
208 $(call Package/avahi/Default/description)
210 This packages adds the libavahi-client library.
211 For more information please see the avahi documentation.
213 Requires D-Bus support.
216 define Package/avahi-utils
217 $(call Package/avahi/Default)
218 SUBMENU:=IP Addresses and Names
219 DEPENDS:=+libavahi-client
224 define Package/avahi-utils/description
225 $(call Package/avahi/Default/description)
227 This packages installs the following avahi utility programs:
228 avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
229 For more information please see the avahi documentation.
231 Requires D-Bus support.
234 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
251 --disable-python-dbus \
254 --disable-doxygen-doc \
255 --disable-doxygen-dot \
256 --disable-doxygen-man \
257 --disable-doxygen-rtf \
258 --disable-doxygen-xml \
259 --disable-doxygen-chm \
260 --disable-doxygen-chi \
261 --disable-doxygen-html \
262 --disable-doxygen-ps \
263 --disable-doxygen-pdf \
266 --with-avahi-user=nobody \
267 --with-avahi-group=nogroup \
268 --with-autoipd-user=nobody \
269 --with-autoipd-group=nogroup
271 ifneq ($(CONFIG_SSP_SUPPORT),y)
273 --disable-stack-protector
276 ifeq ($(BUILD_VARIANT),dbus)
280 ifeq ($(BUILD_VARIANT),nodbus)
286 CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
288 define Build/InstallDev
289 $(INSTALL_DIR) $(1)/usr/include
290 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
291 $(INSTALL_DIR) $(1)/usr/lib
292 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
293 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
294 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
297 define Package/libavahi-dbus/install
298 $(INSTALL_DIR) $(1)/usr/lib
299 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
300 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
301 $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
304 define Package/libavahi/install
305 $(INSTALL_DIR) $(1)/usr/lib
306 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
309 define Package/libavahi-client/install
310 $(INSTALL_DIR) $(1)/usr/lib
311 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
314 define Package/avahi-utils/install
315 $(INSTALL_DIR) $(1)/usr/bin
316 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
319 define Package/avahi-autoipd/install
320 $(INSTALL_DIR) $(1)/etc/avahi
321 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
322 $(INSTALL_DIR) $(1)/usr/sbin
323 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
326 define Package/avahi-daemon/install
327 $(INSTALL_DIR) $(1)/usr/sbin
328 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
329 $(INSTALL_DIR) $(1)/etc/avahi
330 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
331 $(INSTALL_DIR) $(1)/etc/avahi/services
332 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
333 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
334 $(INSTALL_DIR) $(1)/etc/init.d
335 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
338 define Package/avahi-daemon-dbus/install
339 $(INSTALL_DIR) $(1)/usr/sbin
340 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
341 $(INSTALL_DIR) $(1)/etc/avahi
342 $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
343 $(INSTALL_DIR) $(1)/etc/avahi/services
344 $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
345 $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
346 $(INSTALL_DIR) $(1)/etc/init.d
347 $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
350 define Package/avahi-dnsconfd/install
351 $(INSTALL_DIR) $(1)/etc/avahi
352 $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
353 $(INSTALL_DIR) $(1)/usr/sbin
354 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
357 define Package/avahi-dnsconfd-dbus/install
358 $(INSTALL_DIR) $(1)/etc/avahi
359 $(CP) $(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/
364 $(eval $(call BuildPackage,libavahi-client))
365 $(eval $(call BuildPackage,avahi-utils))
366 $(eval $(call BuildPackage,libavahi-dbus))
367 $(eval $(call BuildPackage,libavahi))
368 $(eval $(call BuildPackage,avahi-autoipd))
369 $(eval $(call BuildPackage,avahi-autoipd-dbus))
370 $(eval $(call BuildPackage,avahi-daemon))
371 $(eval $(call BuildPackage,avahi-daemon-dbus))
372 $(eval $(call BuildPackage,avahi-dnsconfd))
373 $(eval $(call BuildPackage,avahi-dnsconfd-dbus))