bool "avahi"
default n
help
- Avahi is a system which facilitates service
- discovery on a local network.
+ Avahi is a system which facilitates service
+ discovery on a local network.
http://www.avahi.org/
+
+config BR2_PACKAGE_AVAHI_AUTOIPD
+ bool " IPv4LL network address configuration daemon"
+ default y
+ depends on BR2_PACKAGE_AVAHI
+ help
+ Avahi-autoipd implements IPv4LL, "Dynamic Configuration of
+ IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for
+ automatic IP address configuration from the link-local
+ 169.254.0.0/16 range without the need for a central server.
+ It is primarily intended to be used in ad-hoc networks which
+ lack a DHCP server.
+
+config BR2_PACKAGE_AVAHI_DAEMON
+ bool " mDNS/DNS-SD daemon"
+ default n
+ depends on BR2_PACKAGE_AVAHI
+ select BR2_PACKAGE_EXPAT
+ help
+ The Avahi mDNS/DNS-SD daemon implementing Apple's ZeroConf
+ architecture (also known as "Rendezvous" or "Bonjour").
+ The daemon registers local IP addresses and services using
+ mDNS/DNS-SD.
AVAHI_SOURCE:=avahi-$(AVAHI_VER).tar.gz
AVAHI_CAT:=$(ZCAT)
+AVAHI_TARGETS:=
+
+ifeq ($(strip $(BR2_PACKAGE_AVAHI_AUTOIPD)),y)
+AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-autoipd
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_AVAHI_DAEMON)),y)
+AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-daemon
+AVAHI_DISABLE_EXPAT:=
+# depend on the exact library file instead of expat so avahi isn't always
+# considered out-of-date
+AVAHI_EXPAT_DEP:=$(STAGING_DIR)/lib/libexpat.so.1
+else
+AVAHI_DISABLE_EXPAT:=--disable-expat
+AVAHI_EXPAT_DEP:=
+endif
+
$(DL_DIR)/$(AVAHI_SOURCE):
$(WGET) -P $(DL_DIR) $(AVAHI_SITE)/$(AVAHI_SOURCE)
toolchain/patch-kernel.sh $(AVAHI_DIR) package/avahi/ \*.patch
touch $(AVAHI_DIR)/.unpacked
-$(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked
+$(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked $(AVAHI_EXPAT_DEP)
(cd $(AVAHI_DIR) && rm -rf config.cache && autoconf)
( \
cd $(AVAHI_DIR) && \
--disable-qt4 \
--disable-gtk \
--disable-dbus \
- --disable-expat \
+ $(AVAHI_DISABLE_EXPAT) \
--disable-gdbm \
--disable-python \
--disable-python-dbus \
$(STAGING_DIR)/usr/sbin/avahi-autoipd: $(AVAHI_DIR)/.compiled
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-autoipd install
- touch -c $(STAGING_DIR)/usr/sbin/avahi-autoipd
+ touch -c $@
$(TARGET_DIR)/usr/sbin/avahi-autoipd: $(STAGING_DIR)/usr/sbin/avahi-autoipd
cp $^ $@
chmod 0755 $(TARGET_DIR)/usr/share/udhcpc/default.script
$(STRIP) --strip-unneeded $@
-avahi: uclibc busybox libdaemon $(TARGET_DIR)/usr/sbin/avahi-autoipd
+$(STAGING_DIR)/usr/lib/libavahi-common.so: $(AVAHI_DIR)/.compiled
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-common install
+ touch -c $@
+
+$(STAGING_DIR)/usr/lib/libavahi-core.so: $(AVAHI_DIR)/.compiled $(STAGING_DIR)/usr/lib/libavahi-common.so
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-core install
+ touch -c $@
+
+$(STAGING_DIR)/usr/sbin/avahi-daemon: $(AVAHI_DIR)/.compiled $(STAGING_DIR)/usr/lib/libavahi-core.so $(STAGING_DIR)/usr/lib/libavahi-common.so
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR)/avahi-daemon install
+ touch -c $@
+
+$(TARGET_DIR)/usr/sbin/avahi-daemon: $(STAGING_DIR)/usr/sbin/avahi-daemon
+ cp $^ $@
+ cp -dpf $(STAGING_DIR)/lib/libavahi-*.so* $(TARGET_DIR)/usr/lib/
+ mkdir -p $(TARGET_DIR)/etc/avahi/services
+ cp -af $(BASE_DIR)/package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
+ $(STRIP) --strip-unneeded $@
+ $(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libavahi-*.so*
+
+avahi: uclibc busybox libdaemon $(AVAHI_TARGETS)
avahi-clean:
$(MAKE) -C $(AVAHI_DIR) distclean
rm -rf $(TARGET_DIR)/etc/avahi
rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
rm -f $(TARGET_DIR)/etc/init.d/S*avahi*
+ rm -f $(TARGET_DIR)/usr/sbin/avahi-*
avahi-dirclean:
rm -rf $(AVAHI_DIR)