shairport: Move to sound menu and sub-directory
authorTed Hess <thess@kitschensync.net>
Wed, 4 Feb 2015 19:25:35 +0000 (14:25 -0500)
committerTed Hess <thess@kitschensync.net>
Wed, 4 Feb 2015 19:43:10 +0000 (14:43 -0500)
Signed-off-by: Ted Hess <thess@kitschensync.net>
multimedia/shairport/Makefile [deleted file]
multimedia/shairport/files/shairport.config [deleted file]
multimedia/shairport/files/shairport.init [deleted file]
multimedia/shairport/patches/001-disable_pulseaudio.patch [deleted file]
sound/shairport/Makefile [new file with mode: 0644]
sound/shairport/files/shairport.config [new file with mode: 0644]
sound/shairport/files/shairport.init [new file with mode: 0644]
sound/shairport/patches/001-disable_pulseaudio.patch [new file with mode: 0644]

diff --git a/multimedia/shairport/Makefile b/multimedia/shairport/Makefile
deleted file mode 100644 (file)
index 0b71707..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Copyright (C) 2013-2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=shairport
-PKG_VERSION:=2014-10-28
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/abrasive/shairport.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=d679d19a4bd66cc220dabfd23ad748c34e95995c
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
-
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSES
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/shairport
-  SECTION:=multimedia
-  CATEGORY:=Multimedia
-  DEPENDS:=+libpthread +libopenssl +libavahi-client +alsa-lib
-  TITLE:=ShairPort AirPort Express emulator
-endef
-
-define Package/shairport/description
-  This program emulates an AirPort Express for the purpose of streaming
-  music from iTunes and compatible iPods. It implements a server for the
-  Apple RAOP protocol.
-  ShairPort does not support AirPlay v2 (video and photo streaming).
-
-  It supports multiple simultaneous streams, if your audio output chain
-  (as detected by libao) does so.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-LIBS:=-lm -lcrypto -lpthread -lavahi-common -lavahi-client -lasound
-
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-       LDFLAGS="$(TARGET_LDFLAGS) $(LIBS)"
-
-define Package/shairport/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport $(1)/usr/bin/
-       $(INSTALL_DIR) $(1)/etc/init.d/
-       $(INSTALL_BIN) files/shairport.init $(1)/etc/init.d/shairport
-       $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) files/shairport.config $(1)/etc/config/shairport
-endef
-
-$(eval $(call BuildPackage,shairport))
diff --git a/multimedia/shairport/files/shairport.config b/multimedia/shairport/files/shairport.config
deleted file mode 100644 (file)
index 9b2165a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-config shairport main
-       option disabled '1'
-       option respawn '1'
-       option bname 'AirPort'
-       option password ''
-       option port '5002'
-       option buffer ''
-       option log_file ''
-       option err_file ''
-       option meta_dir ''
-       option cmd_start ''
-       option cmd_stop ''
-       option cmd_wait '0'
-       option audio_output 'alsa'
-       option mdns 'avahi'
-
-       # options for alsa output
-       option output_dev ''
-       option mixer_dev ''
-       option mixer_type ''
-       option mixer_control ''
-       option mixer_index ''
-
-       # options for ao output
-       option ao_driver ''
-       option ao_name ''
-       option ao_id ''
-       option ao_options ''
-
-       # options for pipe output
-       option output_fifo ''
-
-       # options for pulse output
-       option pulse_server ''
-       option pulse_sink ''
-       option pulse_appname ''
diff --git a/multimedia/shairport/files/shairport.init b/multimedia/shairport/files/shairport.init
deleted file mode 100644 (file)
index 341ff6f..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2013-2014 OpenWrt.org
-
-START=94
-USE_PROCD=1
-
-append_arg() {
-       local cfg="$1"
-       local var="$2"
-       local opt="$3"
-       local def="$4"
-       local val
-
-       config_get val "$cfg" "$var"
-       [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
-}
-
-append_bool() {
-       local cfg="$1"
-       local var="$2"
-       local opt="$3"
-       local def="$4"
-       local val
-
-       config_get_bool val "$cfg" "$var" "$def"
-       [ "$val" = 1 ] && procd_append_param command "$opt"
-}
-
-start_instance() {
-       local cfg="$1"
-       local ao dev aux
-
-       config_get_bool aux "$cfg" 'disabled' '0'
-       [ "$aux" = 1 ] && return 1
-
-       procd_open_instance
-
-       procd_set_param command /usr/bin/shairport
-
-       append_arg "$cfg" bname "-a" "AirPort"
-       append_arg "$cfg" log_file "-l"
-       append_arg "$cfg" err_file "-e"
-       append_arg "$cfg" meta_dir "-M"
-       append_arg "$cfg" buffer "-b"
-       append_arg "$cfg" port "-p"
-       append_arg "$cfg" password "-k"
-       append_arg "$cfg" mdns "-m"
-
-       append_arg "$cfg" cmd_start "-B"
-       append_arg "$cfg" cmd_stop "-E"
-       append_bool "$cfg" cmd_wait "-w"
-
-       append_arg "$cfg" audio_output "-o"
-
-       config_get ao "$cfg" audio_output ""
-       if [ "$ao" = "alsa" ]; then
-               config_get dev "$cfg" output_dev ""
-               if [ -n "$dev" ]; then
-                       procd_append_param command "--"
-                       append_arg "$cfg" output_dev "-d"
-                       append_arg "$cfg" mixer_dev "-m"
-                       append_arg "$cfg" mixer_type "-t"
-                       append_arg "$cfg" mixer_control "-c"
-                       append_arg "$cfg" mixer_index "-i"
-               fi
-       elif [ "$ao" = "ao" ]; then
-               config_get dev "$cfg" ao_driver ""
-               if [ -n "$dev" ]; then
-                       procd_append_param command "--"
-                       append_arg "$cfg" ao_driver "-d"
-                       append_arg "$cfg" ao_id "-i"
-                       append_arg "$cfg" ao_name "-n"
-                       append_arg "$cfg" ao_options "-o"
-               fi
-       elif [ "$ao" = "pipe" ]; then
-               config_get dev "$cfg" output_fifo ""
-               if [ -n "$dev" ]; then
-                       procd_append_param command "--"
-                       append_arg "$cfg" output_fifo ""
-               fi
-       elif [ "$ao" = "pulse" ]; then
-               config_get dev "$cfg" pulse_server ""
-               if [ -n "$dev" ]; then
-                       procd_append_param command "--"
-                       append_arg "$cfg" pulse_server "-a"
-                       append_arg "$cfg" pulse_sink "-s"
-                       append_arg "$cfg" pulse_appname "-n"
-               fi
-       fi
-
-       config_get_bool aux "$cfg" 'respawn' '0'
-       [ "$aux" = 1 ] && procd_set_param respawn
-
-       procd_close_instance
-}
-
-service_triggers() { 
-       procd_add_reload_trigger "shairport" 
-} 
-
-start_service() {
-       config_load shairport
-       config_foreach start_instance shairport
-}
diff --git a/multimedia/shairport/patches/001-disable_pulseaudio.patch b/multimedia/shairport/patches/001-disable_pulseaudio.patch
deleted file mode 100644 (file)
index 7f0407e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -59,7 +59,7 @@ do_pkg_config()
- do_pkg_config OpenSSL       openssl
--do_pkg_config libao         ao              CONFIG_AO
--do_pkg_config PulseAudio    libpulse-simple CONFIG_PULSE
-+#do_pkg_config libao         ao              CONFIG_AO
-+#do_pkg_config PulseAudio    libpulse-simple CONFIG_PULSE
- do_pkg_config ALSA          alsa            CONFIG_ALSA
- do_pkg_config Avahi\ client avahi-client    CONFIG_AVAHI
diff --git a/sound/shairport/Makefile b/sound/shairport/Makefile
new file mode 100644 (file)
index 0000000..aeb63f7
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2013-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=shairport
+PKG_VERSION:=2014-10-28
+PKG_RELEASE:=2
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://github.com/abrasive/shairport.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=d679d19a4bd66cc220dabfd23ad748c34e95995c
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSES
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/shairport
+  SECTION:=sound
+  CATEGORY:=Sound
+  DEPENDS:=+libpthread +libopenssl +libavahi-client +alsa-lib
+  TITLE:=ShairPort AirPort Express emulator (un-maintained)
+endef
+
+define Package/shairport/description
+  This program emulates an AirPort Express for the purpose of streaming
+  music from iTunes and compatible iPods. It implements a server for the
+  Apple RAOP protocol.
+  ShairPort does not support AirPlay v2 (video and photo streaming).
+
+  It supports multiple simultaneous streams, if your audio output chain
+  (as detected by libao) does so.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+LIBS:=-lm -lcrypto -lpthread -lavahi-common -lavahi-client -lasound
+
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) $(LIBS)"
+
+define Package/shairport/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) files/shairport.init $(1)/etc/init.d/shairport
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) files/shairport.config $(1)/etc/config/shairport
+endef
+
+$(eval $(call BuildPackage,shairport))
diff --git a/sound/shairport/files/shairport.config b/sound/shairport/files/shairport.config
new file mode 100644 (file)
index 0000000..9b2165a
--- /dev/null
@@ -0,0 +1,36 @@
+config shairport main
+       option disabled '1'
+       option respawn '1'
+       option bname 'AirPort'
+       option password ''
+       option port '5002'
+       option buffer ''
+       option log_file ''
+       option err_file ''
+       option meta_dir ''
+       option cmd_start ''
+       option cmd_stop ''
+       option cmd_wait '0'
+       option audio_output 'alsa'
+       option mdns 'avahi'
+
+       # options for alsa output
+       option output_dev ''
+       option mixer_dev ''
+       option mixer_type ''
+       option mixer_control ''
+       option mixer_index ''
+
+       # options for ao output
+       option ao_driver ''
+       option ao_name ''
+       option ao_id ''
+       option ao_options ''
+
+       # options for pipe output
+       option output_fifo ''
+
+       # options for pulse output
+       option pulse_server ''
+       option pulse_sink ''
+       option pulse_appname ''
diff --git a/sound/shairport/files/shairport.init b/sound/shairport/files/shairport.init
new file mode 100644 (file)
index 0000000..341ff6f
--- /dev/null
@@ -0,0 +1,104 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=94
+USE_PROCD=1
+
+append_arg() {
+       local cfg="$1"
+       local var="$2"
+       local opt="$3"
+       local def="$4"
+       local val
+
+       config_get val "$cfg" "$var"
+       [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+}
+
+append_bool() {
+       local cfg="$1"
+       local var="$2"
+       local opt="$3"
+       local def="$4"
+       local val
+
+       config_get_bool val "$cfg" "$var" "$def"
+       [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+start_instance() {
+       local cfg="$1"
+       local ao dev aux
+
+       config_get_bool aux "$cfg" 'disabled' '0'
+       [ "$aux" = 1 ] && return 1
+
+       procd_open_instance
+
+       procd_set_param command /usr/bin/shairport
+
+       append_arg "$cfg" bname "-a" "AirPort"
+       append_arg "$cfg" log_file "-l"
+       append_arg "$cfg" err_file "-e"
+       append_arg "$cfg" meta_dir "-M"
+       append_arg "$cfg" buffer "-b"
+       append_arg "$cfg" port "-p"
+       append_arg "$cfg" password "-k"
+       append_arg "$cfg" mdns "-m"
+
+       append_arg "$cfg" cmd_start "-B"
+       append_arg "$cfg" cmd_stop "-E"
+       append_bool "$cfg" cmd_wait "-w"
+
+       append_arg "$cfg" audio_output "-o"
+
+       config_get ao "$cfg" audio_output ""
+       if [ "$ao" = "alsa" ]; then
+               config_get dev "$cfg" output_dev ""
+               if [ -n "$dev" ]; then
+                       procd_append_param command "--"
+                       append_arg "$cfg" output_dev "-d"
+                       append_arg "$cfg" mixer_dev "-m"
+                       append_arg "$cfg" mixer_type "-t"
+                       append_arg "$cfg" mixer_control "-c"
+                       append_arg "$cfg" mixer_index "-i"
+               fi
+       elif [ "$ao" = "ao" ]; then
+               config_get dev "$cfg" ao_driver ""
+               if [ -n "$dev" ]; then
+                       procd_append_param command "--"
+                       append_arg "$cfg" ao_driver "-d"
+                       append_arg "$cfg" ao_id "-i"
+                       append_arg "$cfg" ao_name "-n"
+                       append_arg "$cfg" ao_options "-o"
+               fi
+       elif [ "$ao" = "pipe" ]; then
+               config_get dev "$cfg" output_fifo ""
+               if [ -n "$dev" ]; then
+                       procd_append_param command "--"
+                       append_arg "$cfg" output_fifo ""
+               fi
+       elif [ "$ao" = "pulse" ]; then
+               config_get dev "$cfg" pulse_server ""
+               if [ -n "$dev" ]; then
+                       procd_append_param command "--"
+                       append_arg "$cfg" pulse_server "-a"
+                       append_arg "$cfg" pulse_sink "-s"
+                       append_arg "$cfg" pulse_appname "-n"
+               fi
+       fi
+
+       config_get_bool aux "$cfg" 'respawn' '0'
+       [ "$aux" = 1 ] && procd_set_param respawn
+
+       procd_close_instance
+}
+
+service_triggers() { 
+       procd_add_reload_trigger "shairport" 
+} 
+
+start_service() {
+       config_load shairport
+       config_foreach start_instance shairport
+}
diff --git a/sound/shairport/patches/001-disable_pulseaudio.patch b/sound/shairport/patches/001-disable_pulseaudio.patch
new file mode 100644 (file)
index 0000000..7f0407e
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/configure
++++ b/configure
+@@ -59,7 +59,7 @@ do_pkg_config()
+ do_pkg_config OpenSSL       openssl
+-do_pkg_config libao         ao              CONFIG_AO
+-do_pkg_config PulseAudio    libpulse-simple CONFIG_PULSE
++#do_pkg_config libao         ao              CONFIG_AO
++#do_pkg_config PulseAudio    libpulse-simple CONFIG_PULSE
+ do_pkg_config ALSA          alsa            CONFIG_ALSA
+ do_pkg_config Avahi\ client avahi-client    CONFIG_AVAHI