[packages] libs/avahi: fixed mutating libavahi/avahi-daemon. The package was producing a package avahi which required dbus if libavahi-dbus-support was selected (even as module), and without dbus if that package was not select. This has been fixed so that there are now dbus versions of the binary packages and non-dbus versions of the ones that can be without dbus, so that the smaller platformas can still have avahi without dbus, and those who want the dbus avahi can have it as well.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@27479 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
cshore 2011-07-06 08:19:14 +00:00
parent e8fb0b1ddf
commit 52fb494968

View File

@ -15,7 +15,9 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://avahi.org/download/
PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43
PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh
@ -28,7 +30,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/avahi/Default
SECTION:=net
CATEGORY:=Network
TITLE:=An mDNS/DNS-SD implementation
TITLE:=mDNS/DNS-SD
URL:=http://www.avahi.org/
endef
@ -48,6 +50,16 @@ define Package/libavahi
CATEGORY:=Libraries
DEPENDS:=+libdaemon +libpthread +libgdbm
TITLE+= (library)
VARIANT:=nodbus
endef
define Package/libavahi-dbus
$(call Package/avahi/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libdaemon +libpthread +libgdbm +dbus
TITLE+= (library) (dbus)
VARIANT:=dbus
endef
define Package/libavahi/description
@ -55,15 +67,32 @@ $(call Package/avahi/Default/description)
.
This 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.
This version is compiled without D-Bus support, i.e. the --disable-dbus
compilation flag is set.
endef
define Package/libavahi-dbus/description
$(call Package/avahi/Default/description)
.
This package contains the mDNS/DNS-SD shared libraries, used by other programs.
Specifically, it provides libavahi-core and libavahi-common libraries.
This version is compiled with D-Bus support
endef
define Package/avahi-autoipd
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libdaemon
TITLE:=IPv4LL network address configuration daemon
TITLE:=IPv4LL address conf daemon
VARIANT:=nodbus
endef
define Package/avahi-autoipd-dbus
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libdaemon
TITLE:=IPv4LL address conf daemon (dbus)
VARIANT:=dbus
endef
define Package/avahi-autoipd/description
@ -74,6 +103,20 @@ $(call Package/avahi/Default/description)
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.
.
This verison is compile along with non-D-Bus version of libavahi.
endef
define Package/avahi-autoipd-dbus/description
$(call Package/avahi/Default/description)
.
This package 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.
.
This version is compiled along with the D-Bus version of libavahi.
endef
define Package/avahi-daemon
@ -81,6 +124,15 @@ define Package/avahi-daemon
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi +libexpat
TITLE+= (daemon)
VARIANT:=nodbus
endef
define Package/avahi-daemon-dbus
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-dbus +libexpat
TITLE+= (daemon) (dbus)
VARIANT:=dbus
endef
define Package/avahi-daemon/description
@ -89,17 +141,38 @@ $(call Package/avahi/Default/description)
This package contains an mDNS/DNS-SD daemon.
endef
define Package/avahi-daemon-dbus/description
$(call Package/avahi/Default/description)
.
This package contains an mDNS/DNS-SD daemon with dbus support.
endef
define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf
/etc/avahi/services/http.service
/etc/avahi/services/ssh.service
endef
define Package/avahi-daemon-dbus/conffiles
/etc/avahi/avahi-daemon.conf
/etc/avahi/services/http.service
/etc/avahi/services/ssh.service
endef
define Package/avahi-dnsconfd
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi
TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
VARIANT:=nodbus
endef
define Package/avahi-dnsconfd-dbus
$(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-dbus
TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon with dbus support
VARIANT:=dbus
endef
define Package/avahi-dnsconfd/description
@ -108,34 +181,27 @@ $(call Package/avahi/Default/description)
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 for advanced features)
endef
define Package/libavahi-dbus-support/description
$(call Package/libavahi/description)
.
This package enables D-Bus support in libavahi. This is needed for libavahi to
provide advanced features -- support for avahi-browse, avahi-publish
and the libavahi-client library.
It requires the D-Bus package to be included in the build.
Selecting this modifies the contents of the libavahi package by setting
the --enable-dbus compilation flag; it does not generate a separate package of its own.
This version does not have D-Bus support.
endef
define Package/avahi-dnsconfd-dbus/description
$(call Package/avahi/Default/description)
.
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.
.
This version has D-Bus support.
endef
define Package/libavahi-client
$(call Package/avahi/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libavahi-dbus-support
DEPENDS:=+libavahi-dbus
TITLE+= (libavahi-client library)
VARIANT:=dbus
endef
define Package/libavahi-client/description
@ -143,6 +209,8 @@ $(call Package/avahi/Default/description)
.
This packages adds the libavahi-client library.
For more information please see the avahi documentation.
.
Requires D-Bus support.
endef
define Package/avahi-utils
@ -150,6 +218,7 @@ define Package/avahi-utils
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-client
TITLE+= (utilities)
VARIANT:=dbus
endef
define Package/avahi-utils/description
@ -158,6 +227,8 @@ $(call Package/avahi/Default/description)
This packages installs the following avahi utility programs:
avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name.
For more information please see the avahi documentation.
.
Requires D-Bus support.
endef
TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE
@ -205,7 +276,8 @@ endif
ifeq ($(BUILD_VARIANT),dbus)
CONFIGURE_ARGS += \
--enable-dbus
else
endif
ifeq ($(BUILD_VARIANT),nodbus)
CONFIGURE_ARGS += \
--disable-dbus
endif
@ -222,17 +294,16 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef
define Package/libavahi-dbus-support/install
define Package/libavahi-dbus/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d
$(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
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
@ -264,6 +335,18 @@ define Package/avahi-daemon/install
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef
define Package/avahi-daemon-dbus/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/avahi
$(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
$(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef
define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
@ -271,11 +354,21 @@ define Package/avahi-dnsconfd/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
endef
define Package/avahi-dnsconfd-dbus/install
$(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin
$(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-dbus))
$(eval $(call BuildPackage,libavahi))
$(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-autoipd-dbus))
$(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-daemon-dbus))
$(eval $(call BuildPackage,avahi-dnsconfd))
$(eval $(call BuildPackage,avahi-dnsconfd-dbus))