Browse Source

mpd: factor out avahi service file

As discussed in #543 provide the avahi service file within its own
tiny package to allow the user to choose which services are
announced.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

---

The former avahi service file was only installed for mpd-full. Does
the mpd-mini does not support network functionality?

Then we should adjust deps here...
lilik-openwrt-22.03
Michael Heimpold 10 years ago
parent
commit
2f3cfb9c2d
2 changed files with 25 additions and 5 deletions
  1. +24
    -4
      sound/mpd/Makefile
  2. +1
    -1
      sound/mpd/files/mpd.service

+ 24
- 4
sound/mpd/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mpd
PKG_VERSION:=0.18.16
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.18/
@ -63,7 +63,6 @@ $(call Package/mpd/Default/description)
endef
define Package/mpd-full/conffiles
/etc/avahi/services/mpd.service
/etc/mpd.conf
endef
@ -85,6 +84,23 @@ define Package/mpd-mini/conffiles
/etc/mpd.conf
endef
define Package/mpd-avahi-service
$(call Package/mpd/Default)
TITLE+= (Avahi service)
DEPENDS+=+avahi-daemon
endef
define Package/mpd-avahi-service/description
$(call Package/mpd/Default/description)
.
This package contains the service definition for announcing the
Music Player Daemon service via mDNS/DNS-SD.
endef
define Package/mpd-avahi-service/conffiles
/etc/avahi/services/mpd.service
endef
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-debug \
@ -198,13 +214,17 @@ endef
define Package/mpd-full/install
$(call Package/mpd/install,$1)
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef
define Package/mpd-mini/install
$(call Package/mpd/install,$1)
endef
define Package/mpd-avahi-service/install
$(INSTALL_DIR) $(1)/etc/avahi/services
$(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
endef
$(eval $(call BuildPackage,mpd-full))
$(eval $(call BuildPackage,mpd-mini))
$(eval $(call BuildPackage,mpd-avahi-service))

+ 1
- 1
sound/mpd/files/mpd.service View File

@ -1,7 +1,7 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Music Player Daemon on %h</name>
<name replace-wildcards="yes">%h</name>
<service>
<type>_mpd._tcp</type>
<port>6600</port>


Loading…
Cancel
Save