packages: ipv6/tayga: move static mappings to 'firewall' config
[openwrt/svn-archive/archive.git] / libs / avahi / Makefile
index 152a3d5970dca87541db6e2bfd6afea995f561e5..bf00e773ec9aace7fe4e9f371fd593119a28a6ae 100644 (file)
@@ -1,6 +1,5 @@
 #
-
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,17 +7,31 @@
 
 include $(TOPDIR)/rules.mk
 
+ifeq ($(BUILD_VARIANT),dbus)
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-dbus/$(PKG_NAME)-$(PKG_VERSION)
+else
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-nodbus/$(PKG_NAME)-$(PKG_VERSION)
+endif
+
+
 PKG_NAME:=avahi
-PKG_VERSION:=0.6.25
-PKG_RELEASE:=1
+PKG_VERSION:=0.6.30
+PKG_RELEASE:=3
+
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://avahi.org/download/
-PKG_MD5SUM:=a83155a6e29e3988f07e5eea3287b21e
+PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43
+
+PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
-PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm
 
-PKG_FIXUP = libtool
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -30,12 +43,14 @@ define Package/avahi/Default
 endef
 
 define Package/avahi/Default/description
- An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).
- Avahi is a system which facilitates service discovery on a local network --
- this means that you can plug your laptop or computer into a network and
- instantly be able to view other people who you can chat with, find printers
- to print to or find files being shared. This kind of technology is already
- found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
+ Avahi is an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) 
+ implementation (library). It facilitates 
+ service discovery on a local network -- this means that 
+ you can plug your laptop or computer into a network and
+ instantly be able to view other people who you can chat with, 
+ find printers to print to or find files being shared.
+ This kind of technology is already found in MacOS X
+ (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
  and is very convenient.
 endef
 
@@ -43,18 +58,25 @@ define Package/libavahi
   $(call Package/avahi/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libdaemon +libpthread
+  DEPENDS:=+libdaemon +libpthread +libgdbm
   TITLE+= (library)
 endef
 
 define Package/libavahi/description
-$(call Package/avahi/Default/description) 
+$(call Package/avahi/Default/description)
  .
- This package contains the mDNS/DNS-SD shared libraries, used by other programs.
+ The libavahi package contains the mDNS/DNS-SD shared libraries,
+ used by other programs. Specifically, it provides
+ libavahi-core and libavahi-common libraries.
+ By default, it is compiled without D-Bus support,
+ i.e. the --disable-dbus compilation flag is set.
+ To enable D-Bus support, select the package
+ libavahi-dbus-support.
 endef
 
 define Package/avahi-autoipd
   $(call Package/avahi/Default)
+  SUBMENU:=IP Addresses and Names
   DEPENDS:=+libdaemon
   TITLE:=IPv4LL network address configuration daemon
 endef
@@ -71,6 +93,7 @@ endef
 
 define Package/avahi-daemon
   $(call Package/avahi/Default)
+  SUBMENU:=IP Addresses and Names
   DEPENDS:=+libavahi +libexpat
   TITLE+= (daemon)
 endef
@@ -89,18 +112,75 @@ endef
 
 define Package/avahi-dnsconfd
   $(call Package/avahi/Default)
+  SUBMENU:=IP Addresses and Names
   DEPENDS:=+libavahi
-  TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon
+  TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
 endef
 
 define Package/avahi-dnsconfd/description
 $(call Package/avahi/Default/description)
  .
- This package contains an Unicast DNS server from mDNS/DNS-SD configuration
+ This package contains a Unicast DNS server from mDNS/DNS-SD configuration
  daemon, which may be used to configure conventional DNS servers using mDNS
  in a DHCP-like fashion. Especially useful on IPv6.
 endef
 
+define Package/libavahi-dbus-support
+  $(call Package/avahi/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  VARIANT:=dbus
+  DEPENDS:=+dbus +libavahi
+  TITLE+= (D-Bus support)
+endef
+
+define Package/libavahi-dbus-support/description
+$(call Package/libavahi/description)
+ .
+ The libavahi-dbus-support package enables
+ D-Bus support in libavahi, needed to support
+ the libavahi-client library and avahi-utils.
+ Selecting this package modifies the contents of the
+ libavahi package by setting the --enable-dbus compilation flag;
+ it does not generate a separate binary of its own.
+ It also automatically adds the D-Bus package to the build.
+ libavahi-dbus-support is selected automatically if you select
+ libavahi-client or avahi-utils.
+endef
+
+define Package/libavahi-client
+  $(call Package/avahi/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libavahi-dbus-support +avahi-daemon
+  TITLE+= (libavahi-client library)
+endef
+
+define Package/libavahi-client/description
+$(call Package/avahi/Default/description)
+ .
+ This packages adds the libavahi-client library.
+ It also automatically adds the required
+ libavahi-dbus-support and the avahi-daemon packages.
+ For more information please see the avahi documentation.
+endef
+
+define Package/avahi-utils
+  $(call Package/avahi/Default)
+  SUBMENU:=IP Addresses and Names
+  DEPENDS:=+libavahi-client
+  TITLE+= (utilities)
+endef
+
+define Package/avahi-utils/description
+$(call Package/avahi/Default/description)
+ .
+ This packages installs the following avahi utility programs:
+ avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
+ It also automatically adds the required libavahi-client package.
+ For more information please see the avahi documentation.
+endef
+
 TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
 
 CONFIGURE_ARGS+= \
@@ -111,7 +191,7 @@ CONFIGURE_ARGS+= \
        --disable-qt3 \
        --disable-qt4 \
        --disable-gtk \
-       --disable-dbus \
+       --disable-gtk3 \
        --with-xml=expat \
        --disable-dbm \
        --enable-gdbm \
@@ -143,33 +223,47 @@ CONFIGURE_ARGS+= \
        --disable-stack-protector
 endif
 
-CONFIGURE_VARS+= \
-       CFLAGS="$$$$CFLAGS -DNDEBUG" \
-       $(if $(CONFIG_LINUX_2_4),ac_cv_header_sys_inotify_h=no)
+ifeq ($(BUILD_VARIANT),dbus)
+CONFIGURE_ARGS += \
+       --enable-dbus
+else
+CONFIGURE_ARGS += \
+       --disable-dbus  
+endif
 
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
-       $(call Build/Configure/Default)
-endef
+CONFIGURE_VARS+= \
+       CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
 endef
 
-define Build/InstallDev
-       mkdir -p $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/
-       mkdir -p $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(1)/usr/lib/
-       mkdir -p $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(1)/usr/lib/pkgconfig/
+define Package/libavahi-dbus-support/install
+       $(INSTALL_DIR) $(1)/usr/lib
 endef
 
 define Package/libavahi/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
+ifeq ($(BUILD_VARIANT),dbus)
+       $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
+       $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
+endif
+endef
+
+define Package/libavahi-client/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
+endef
+
+define Package/avahi-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
 endef
 
 define Package/avahi-autoipd/install
@@ -198,12 +292,11 @@ define Package/avahi-dnsconfd/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
 endef
 
+$(eval $(call BuildPackage,libavahi-client))
+$(eval $(call BuildPackage,avahi-utils))
+$(eval $(call BuildPackage,libavahi-dbus-support))
 $(eval $(call BuildPackage,libavahi))
 $(eval $(call BuildPackage,avahi-autoipd))
 $(eval $(call BuildPackage,avahi-daemon))
 $(eval $(call BuildPackage,avahi-dnsconfd))
 
-$(eval $(call RequireCommand,intltool-update, \
-       $(PKG_NAME) requires intltool >= 0.35.0 \
-))
-