diff options
Diffstat (limited to 'package/avahi/avahi.mk')
-rw-r--r-- | package/avahi/avahi.mk | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index ad86c8f97..4b0f306b8 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -16,6 +16,23 @@ AVAHI_SITE:=http://www.avahi.org/download/ 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) @@ -26,7 +43,7 @@ $(AVAHI_DIR)/.unpacked: $(DL_DIR)/$(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) && \ @@ -111,7 +128,7 @@ $(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked --disable-qt4 \ --disable-gtk \ --disable-dbus \ - --disable-expat \ + $(AVAHI_DISABLE_EXPAT) \ --disable-gdbm \ --disable-python \ --disable-python-dbus \ @@ -132,7 +149,7 @@ $(AVAHI_DIR)/.compiled: $(AVAHI_DIR)/.configured $(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 $^ $@ @@ -145,13 +162,34 @@ $(TARGET_DIR)/usr/sbin/avahi-autoipd: $(STAGING_DIR)/usr/sbin/avahi-autoipd 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) |