summaryrefslogtreecommitdiffstats
path: root/package/avahi/avahi.mk
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-03-05 21:38:40 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-03-05 21:38:40 +0000
commit744c8224a2cdae4086f6bc7477521ee5c8909989 (patch)
treea071952e753a5bb013ee5fe5d39414f961327314 /package/avahi/avahi.mk
parentb8a8f1c434d618ce7c603da4aa2e4b59a3d76515 (diff)
downloadbuildroot-novena-744c8224a2cdae4086f6bc7477521ee5c8909989.tar.gz
buildroot-novena-744c8224a2cdae4086f6bc7477521ee5c8909989.zip
avahi: convert to Makefile.autotools.in format
Diffstat (limited to 'package/avahi/avahi.mk')
-rw-r--r--package/avahi/avahi.mk155
1 files changed, 43 insertions, 112 deletions
diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index 78c24c276..5f996be05 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -10,54 +10,13 @@
# either version 2.1 of the License, or (at your option) any
# later version.
-AVAHI_VERSION:=0.6.22
-AVAHI_DIR:=$(BUILD_DIR)/avahi-$(AVAHI_VERSION)
-AVAHI_SITE:=http://www.avahi.org/download/
-AVAHI_SOURCE:=avahi-$(AVAHI_VERSION).tar.gz
-AVAHI_CAT:=$(ZCAT)
+AVAHI_VERSION = 0.6.22
+AVAHI_SOURCE = avahi-$(AVAHI_VERSION).tar.gz
+AVAHI_SITE = http://www.avahi.org/download/
+AVAHI_INSTALL_STAGING = YES
+AVAHI_INSTALL_TARGET = YES
-AVAHI_TARGETS:=
-
-ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
-AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-autoipd
-endif
-
-AVAHI_EXTRA_DEPS:=
-
-ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
-AVAHI_TARGETS+=$(TARGET_DIR)/usr/sbin/avahi-daemon
-AVAHI_DISABLE_EXPAT:=--with-xml=expat
-# depend on the exact library file instead of expat so avahi isn't always
-# considered out-of-date
-AVAHI_EXTRA_DEPS+=$(STAGING_DIR)/usr/lib/libexpat.so.1
-else
-AVAHI_DISABLE_EXPAT:=--disable-expat --with-xml=none
-
-endif
-
-ifeq ($(BR2_PACKAGE_DBUS),y)
-AVAHI_DISABLE_DBUS:=
-AVAHI_EXTRA_DEPS+=dbus
-else
-AVAHI_DISABLE_DBUS:=--disable-dbus
-endif
-
-$(DL_DIR)/$(AVAHI_SOURCE):
- $(call DOWNLOAD,$(AVAHI_SITE),$(AVAHI_SOURCE))
-
-avahi-source: $(DL_DIR)/$(AVAHI_SOURCE)
-
-$(AVAHI_DIR)/.unpacked: $(DL_DIR)/$(AVAHI_SOURCE)
- $(AVAHI_CAT) $(DL_DIR)/$(AVAHI_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(AVAHI_DIR) package/avahi/ \*.patch
- touch $@
-
-$(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked $(AVAHI_EXTRA_DEPS)
- (cd $(AVAHI_DIR) && rm -rf config.cache && PATH=$(TARGET_PATH) autoconf)
- (cd $(AVAHI_DIR) && \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ac_cv_func_strtod=yes \
+AVAHI_CONF_ENV = ac_cv_func_strtod=yes \
ac_fsusage_space=yes \
fu_cv_sys_stat_statfs2_bsize=yes \
ac_cv_func_closedir_void=no \
@@ -110,22 +69,14 @@ $(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked $(AVAHI_EXTRA_DEPS)
ac_cv_func_working_mktime=yes \
jm_cv_func_working_re_compile_pattern=yes \
ac_use_included_regex=no \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(REAL_GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- $(DISABLE_NLS) \
- $(DISABLE_LARGEFILE) \
+ avahi_cv_sys_cxx_works=yes
+
+AVAHI_CONF_OPT = --localstatedir=/var \
--disable-glib \
--disable-gobject \
--disable-qt3 \
--disable-qt4 \
--disable-gtk \
- $(AVAHI_DISABLE_DBUS) \
- $(AVAHI_DISABLE_EXPAT) \
--disable-gdbm \
--disable-python \
--disable-python-dbus \
@@ -134,70 +85,50 @@ $(AVAHI_DIR)/.configured: $(AVAHI_DIR)/.unpacked $(AVAHI_EXTRA_DEPS)
--disable-monodoc \
--disable-stack-protector \
--with-distro=none \
+ $(if $(BR2_HAVE_MANPAGES),--enable,--disable)-manpages \
+ $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \
--with-avahi-user=default \
--with-avahi-group=default \
--with-autoipd-user=default \
- --with-autoipd-group=default \
- )
- touch $@
+ --with-autoipd-group=default
-$(AVAHI_DIR)/.compiled: $(AVAHI_DIR)/.configured
- $(MAKE) -C $(AVAHI_DIR) $(if $(BR2_ENABLE_LOCALE),LIBS=-lintl)
- touch $@
+AVAHI_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),gettext libintl)
-$(AVAHI_DIR)/.installed: $(AVAHI_DIR)/.compiled
- mkdir -p $(STAGING_DIR)/etc/avahi
- $(MAKE) DESTDIR=$(STAGING_DIR) -C $(AVAHI_DIR) install
- touch $@
+ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
+AVAHI_DEPENDENCIES += libdaemon
+else
+AVAHI_CONF_OPT += --disable-libdaemon
+endif
-$(TARGET_DIR)/usr/sbin/avahi-autoipd: $(AVAHI_DIR)/.installed
- mkdir -p $(addprefix $(TARGET_DIR),\
- /etc/avahi /etc/init.d /var/lib /usr/share/udhcpc /usr/sbin)
- cp -af $(STAGING_DIR)/etc/avahi/avahi-autoipd.action $(TARGET_DIR)/etc/avahi/
- cp -af package/avahi/busybox-udhcpc-default.script $(TARGET_DIR)/usr/share/udhcpc/default.script
- chmod 0755 $(TARGET_DIR)/usr/share/udhcpc/default.script
- cp -af package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/
- cp $(STAGING_DIR)/usr/sbin/avahi-autoipd $@
- rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
- ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
+ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
+AVAHI_DEPENDENCIES += expat
+AVAHI_CONF_OPT += --with-xml=expat
+else
+AVAHI_CONF_OPT += --with-xml=none
+endif
-$(TARGET_DIR)/usr/sbin/avahi-daemon: $(AVAHI_DIR)/.installed
- mkdir -p $(addprefix $(TARGET_DIR),\
- /etc/avahi/services /usr/lib /usr/bin /usr/sbin)
- cp -dpf $(STAGING_DIR)/usr/lib/libavahi-*.so* $(TARGET_DIR)/usr/lib/
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libavahi-*.so*
- cp -af $(STAGING_DIR)/etc/avahi/avahi-daemon.conf $(TARGET_DIR)/etc/avahi/
- cp -af package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
ifeq ($(BR2_PACKAGE_DBUS),y)
- cp -dpf $(STAGING_DIR)/usr/bin/avahi-* $(TARGET_DIR)/usr/bin
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/avahi-*
- mkdir -p $(TARGET_DIR)/etc/dbus-1/system.d/
- cp -r $(STAGING_DIR)/etc/dbus-1/system.d/avahi-* \
- $(TARGET_DIR)/etc/dbus-1/system.d/
+AVAHI_DEPENDENCIES += dbus
+else
+AVAHI_CONF_OPT += --disable-dbus
endif
- cp $(STAGING_DIR)/usr/sbin/avahi-daemon $@
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
-avahi: host-autoconf uclibc libdaemon $(if $(BR2_ENABLE_LOCALE),gettext libintl) $(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-*
- -rm -f $(TARGET_DIR)/usr/bin/avahi-*
- -rm -f $(TARGET_DIR)/usr/lib/libavahi-*
+ifeq ($(BR2_ENABLE_LOCALE),y)
+AVAHI_MAKE_OPT = LIBS=-lintl
+endif
-avahi-dirclean:
- rm -rf $(AVAHI_DIR)
+$(eval $(call AUTOTARGETS,package,avahi))
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_AVAHI),y)
-TARGETS+=avahi
+$(AVAHI_HOOK_POST_INSTALL):
+ rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
+ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
+ rm -rf $(TARGET_DIR)/etc/dhcp3/
+ $(INSTALL) -D -m 0755 package/avahi/busybox-udhcpc-default.script $(TARGET_DIR)/usr/share/udhcpc/default.script
+ $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/
+ rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
+ ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
endif
+ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
+ $(INSTALL) -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/
+endif
+ touch $@