Browse Source

Merge pull request #791 from thess/avahi-dbus-options

avahi: Build 2 versions and allow selection of dbus vs non-dbus
lilik-openwrt-22.03
Ted Hess 10 years ago
parent
commit
25a97332b8
3 changed files with 76 additions and 58 deletions
  1. +74
    -56
      libs/avahi/Makefile
  2. +1
    -1
      multimedia/shairplay/Makefile
  3. +1
    -1
      sound/forked-daapd/Makefile

+ 74
- 56
libs/avahi/Makefile View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2007-2014 OpenWrt.org
# Copyright (C) 2007-2015 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -7,19 +7,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
ifeq ($(BUILD_VARIANT),dbus)
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION)
PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION)
else
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION)
PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION)
endif
PKG_NAME:=avahi PKG_NAME:=avahi
PKG_VERSION:=0.6.31 PKG_VERSION:=0.6.31
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://avahi.org/download/ PKG_SOURCE_URL:=http://avahi.org/download/
@ -34,7 +24,11 @@ PKG_REMOVE_FILES:=autogen.sh
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
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
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -57,12 +51,11 @@ define Package/avahi/Default/description
and is very convenient. and is very convenient.
endef endef
define Package/libavahi
define Package/libavahi/Default
$(call Package/avahi/Default) $(call Package/avahi/Default)
SECTION:=libs SECTION:=libs
CATEGORY:=Libraries CATEGORY:=Libraries
DEPENDS:=+libpthread +SSP_SUPPORT:libssp DEPENDS:=+libpthread +SSP_SUPPORT:libssp
TITLE+= (library)
endef endef
define Package/libavahi/description define Package/libavahi/description
@ -71,10 +64,6 @@ $(call Package/avahi/Default/description)
The libavahi package contains the mDNS/DNS-SD shared libraries, The libavahi package contains the mDNS/DNS-SD shared libraries,
used by other programs. Specifically, it provides used by other programs. Specifically, it provides
libavahi-core and libavahi-common libraries. libavahi-core and libavahi-common libraries.
By default, it is built without D-Bus support,
i.e. the --disable-dbus configuration flag is set.
To enable D-Bus support, select the package
libavahi-dbus-support.
endef endef
define Package/avahi-autoipd define Package/avahi-autoipd
@ -94,16 +83,22 @@ $(call Package/avahi/Default/description)
DHCP server. DHCP server.
endef endef
define Package/avahi-daemon
define Package/avahi-dbus-daemon
$(call Package/avahi/Default)
PROVIDES:=avahi-daemon
VARIANT:=dbus
SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-dbus-support +libexpat +librt +libdaemon
TITLE+= (daemon)
endef
define Package/avahi-nodbus-daemon
$(call Package/avahi/Default) $(call Package/avahi/Default)
PROVIDES:=avahi-daemon
VARIANT:=nodbus
SUBMENU:=IP Addresses and Names SUBMENU:=IP Addresses and Names
ifeq ($(BUILD_VARIANT),dbus)
DEPENDS:=+libavahi +libexpat +librt +libdaemon +libdbus
else
DEPENDS:=+libavahi +libexpat +librt +libdaemon
endif
DEPENDS:=+libavahi-nodbus-support +libexpat +librt +libdaemon
TITLE+= (daemon) TITLE+= (daemon)
MENU:=1
endef endef
define Package/avahi-daemon/description define Package/avahi-daemon/description
@ -112,14 +107,20 @@ $(call Package/avahi/Default/description)
This package contains an mDNS/DNS-SD daemon. This package contains an mDNS/DNS-SD daemon.
endef endef
Package/avahi-dbus-daemon/description=$(Package/avahi-daemon/description)
Package/avahi-nodbus-daemon/description=$(Package/avahi-daemon/description)
define Package/avahi-daemon/conffiles define Package/avahi-daemon/conffiles
/etc/avahi/avahi-daemon.conf /etc/avahi/avahi-daemon.conf
endef endef
Package/avahi-dbus-daemon/conffiles=$(Package/avahi-daemon/conffiles)
Package/avahi-nodbus-daemon/conffiles=$(Package/avahi-daemon/conffiles)
define Package/avahi-daemon-service-http define Package/avahi-daemon-service-http
$(call Package/avahi/Default) $(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names SUBMENU:=IP Addresses and Names
DEPENDS:=avahi-daemon
DEPENDS:=+avahi-daemon
TITLE:=Announce HTTP service TITLE:=Announce HTTP service
endef endef
@ -136,7 +137,7 @@ endef
define Package/avahi-daemon-service-ssh define Package/avahi-daemon-service-ssh
$(call Package/avahi/Default) $(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names SUBMENU:=IP Addresses and Names
DEPENDS:=avahi-daemon
DEPENDS:=+avahi-daemon
TITLE:=Announce SSH service TITLE:=Announce SSH service
endef endef
@ -153,8 +154,8 @@ endef
define Package/avahi-dnsconfd define Package/avahi-dnsconfd
$(call Package/avahi/Default) $(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi +libdaemon
TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon
DEPENDS:=+libavahi +libdaemon +libpthread +SSP_SUPPORT:libssp
TITLE:=A Unicast DNS server using avahi-daemon
endef endef
define Package/avahi-dnsconfd/description define Package/avahi-dnsconfd/description
@ -166,20 +167,25 @@ $(call Package/avahi/Default/description)
endef endef
define Package/libavahi-dbus-support define Package/libavahi-dbus-support
$(call Package/avahi/Default)
SECTION:=libs
CATEGORY:=Libraries
$(call Package/libavahi/Default)
VARIANT:=dbus VARIANT:=dbus
DEPENDS:=+dbus +libavahi
DEPENDS:=+dbus
TITLE+= (D-Bus support) TITLE+= (D-Bus support)
endef endef
define Package/libavahi-nodbus-support
$(call Package/libavahi/Default)
VARIANT:=nodbus
TITLE+= (No D-Bus)
endef
define Package/libavahi-dbus-support/description define Package/libavahi-dbus-support/description
$(call Package/libavahi/description) $(call Package/libavahi/description)
. .
The libavahi-dbus-support package enables The libavahi-dbus-support package enables
D-Bus support in avahi, needed to support D-Bus support in avahi, needed to support
the libavahi-client library and avahi-utils. the libavahi-client library and avahi-utils.
.
Selecting this package modifies the build configuration Selecting this package modifies the build configuration
so that avahi packages are built with support for D-BUS enabled; so that avahi packages are built with support for D-BUS enabled;
it does not generate a separate binary of its own. it does not generate a separate binary of its own.
@ -188,11 +194,20 @@ $(call Package/libavahi/description)
libavahi-client or avahi-utils. libavahi-client or avahi-utils.
endef endef
define Package/libavahi-nodbus-support/description
$(call Package/libavahi/description)
.
Selecting this package modifies the build configuration
so that avahi packages are built without support for D-BUS enabled;
it does not generate a separate binary of its own.
endef
define Package/libavahi-client define Package/libavahi-client
$(call Package/avahi/Default) $(call Package/avahi/Default)
SECTION:=libs SECTION:=libs
CATEGORY:=Libraries CATEGORY:=Libraries
DEPENDS:=+libavahi-dbus-support +avahi-daemon
VARIANT:=dbus
DEPENDS:=+avahi-dbus-daemon
TITLE+= (libavahi-client library) TITLE+= (libavahi-client library)
endef endef
@ -201,7 +216,7 @@ $(call Package/avahi/Default/description)
. .
This packages adds the libavahi-client library. This packages adds the libavahi-client library.
It also automatically adds the required It also automatically adds the required
libavahi-dbus-support and the avahi-daemon packages.
libavahi-dbus-support and the avahi-dbus-daemon packages.
For more information please see the avahi documentation. For more information please see the avahi documentation.
endef endef
@ -209,6 +224,7 @@ define Package/libavahi-compat-libdnssd
$(call Package/avahi/Default) $(call Package/avahi/Default)
SECTION:=libs SECTION:=libs
CATEGORY:=Libraries CATEGORY:=Libraries
VARIANT:=dbus
DEPENDS:=+libavahi-client DEPENDS:=+libavahi-client
TITLE+= (libdnssd) TITLE+= (libdnssd)
endef endef
@ -224,7 +240,8 @@ endef
define Package/avahi-utils define Package/avahi-utils
$(call Package/avahi/Default) $(call Package/avahi/Default)
SUBMENU:=IP Addresses and Names SUBMENU:=IP Addresses and Names
DEPENDS:=+libavahi-client +libgdbm
VARIANT:=dbus
DEPENDS:=libavahi-client +libgdbm
TITLE+= (utilities) TITLE+= (utilities)
endef endef
@ -252,7 +269,8 @@ CONFIGURE_ARGS+= \
--disable-dbm \ --disable-dbm \
--enable-gdbm \ --enable-gdbm \
--enable-libdaemon \ --enable-libdaemon \
$(if $(CONFIG_PACKAGE_libavahi-compat-libdnssd),--enable-compat-libdns_sd) \
$(and $(CONFIG_PACKAGE_libavahi-compat-libdnssd),ifeq ($(BUILD_VARIANT),dbus),\
--enable-compat-libdns_sd) \
--disable-python \ --disable-python \
--disable-pygtk \ --disable-pygtk \
--disable-python-dbus \ --disable-python-dbus \
@ -297,30 +315,26 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/
ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),)
ifeq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd)-$(BUILD_VARIANT),y-dbus)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd* $(1)/usr/lib/
endif endif
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef endef
define Package/libavahi-dbus-support/install
$(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 define Package/libavahi/install
# The next line removes the ".build" file from the "other" build.
# The effect is that, if the other build is re-selected in the future,
# the build system will be forced to replace all the code in the
# installer packages, removing anything from the current build.
# "Other" means this: if the current build is "dbus", the other is "nodebus",
# and if the current build is "nodbus", the other is "dbus".
$(RM) -f $(PKG_ALT_DIR)/.built
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/
endef endef
define Package/libavahi-dbus-support/install
$(call Package/libavahi/install,$(1))
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d
endef
Package/libavahi-nodbus-support/install=$(Package/libavahi/install)
define Package/libavahi-client/install define Package/libavahi-client/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/
@ -333,12 +347,12 @@ endef
define Package/avahi-utils/install define Package/avahi-utils/install
$(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef endef
define Package/avahi-autoipd/install define Package/avahi-autoipd/install
$(INSTALL_DIR) $(1)/etc/avahi $(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/
endef endef
@ -355,6 +369,9 @@ define Package/avahi-daemon/install
$(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon
endef endef
Package/avahi-dbus-daemon/install=$(Package/avahi-daemon/install)
Package/avahi-nodbus-daemon/install=$(Package/avahi-daemon/install)
define Package/avahi-daemon-service-http/install define Package/avahi-daemon-service-http/install
$(INSTALL_DIR) $(1)/etc/avahi/services $(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service
@ -367,7 +384,7 @@ endef
define Package/avahi-dnsconfd/install define Package/avahi-dnsconfd/install
$(INSTALL_DIR) $(1)/etc/avahi $(INSTALL_DIR) $(1)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/
endef endef
@ -376,9 +393,10 @@ $(eval $(call BuildPackage,libavahi-client))
$(eval $(call BuildPackage,libavahi-compat-libdnssd)) $(eval $(call BuildPackage,libavahi-compat-libdnssd))
$(eval $(call BuildPackage,avahi-utils)) $(eval $(call BuildPackage,avahi-utils))
$(eval $(call BuildPackage,libavahi-dbus-support)) $(eval $(call BuildPackage,libavahi-dbus-support))
$(eval $(call BuildPackage,libavahi))
$(eval $(call BuildPackage,libavahi-nodbus-support))
$(eval $(call BuildPackage,avahi-autoipd)) $(eval $(call BuildPackage,avahi-autoipd))
$(eval $(call BuildPackage,avahi-daemon))
$(eval $(call BuildPackage,avahi-dbus-daemon))
$(eval $(call BuildPackage,avahi-nodbus-daemon))
$(eval $(call BuildPackage,avahi-daemon-service-http)) $(eval $(call BuildPackage,avahi-daemon-service-http))
$(eval $(call BuildPackage,avahi-daemon-service-ssh)) $(eval $(call BuildPackage,avahi-daemon-service-ssh))
$(eval $(call BuildPackage,avahi-dnsconfd)) $(eval $(call BuildPackage,avahi-dnsconfd))

+ 1
- 1
multimedia/shairplay/Makefile View File

@ -28,7 +28,7 @@ PKG_FIXUP:=libtool
define Package/shairplay define Package/shairplay
SECTION:=multimedia SECTION:=multimedia
CATEGORY:=Multimedia CATEGORY:=Multimedia
DEPENDS:=+avahi-daemon +libao +libavahi-compat-libdnssd +libltdl +libpthread
DEPENDS:=+libao +libavahi-compat-libdnssd +libltdl +libpthread
TITLE:=Shairplay TITLE:=Shairplay
endef endef


+ 1
- 1
sound/forked-daapd/Makefile View File

@ -36,7 +36,7 @@ TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
URL:=https://github.com/ejurgensen/forked-daapd URL:=https://github.com/ejurgensen/forked-daapd
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \ DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
+libevent2 +libdaemon +libantlr3c +confuse +glib2 +alsa-lib +libffmpeg-full \ +libevent2 +libdaemon +libantlr3c +confuse +glib2 +alsa-lib +libffmpeg-full \
+mxml +libavl +avahi-daemon +libavahi-client +sqlite3-cli +libplist +libcurl
+mxml +libavl +libavahi-client +sqlite3-cli +libplist +libcurl
endef endef
define Package/forked-daapd/conffiles define Package/forked-daapd/conffiles


Loading…
Cancel
Save