Skip to contentSkip to conversation

shairplay-sync: new package

PATCH New Jörg Krause 2 participants 4 messages Oct 24, 2014 – Oct 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 shairplay-sync: new package

---
Changes v1 -> v2:
- autoselect SSL backend instead of a user choice
- autoselect zeroconf backend instead of a user choice
- fix missing select for optional package libsoxr
- fix config option for avahi (--with-avahi instead of --with-openssl)
- add comment to tinysvcmdns in shairport-sync.mk

---
 package/Config.in                        |  1 +
 package/shairport-sync/Config.in         | 37 +++++++++++++++++++++++++
 package/shairport-sync/S99shairport-sync | 31 +++++++++++++++++++++
 package/shairport-sync/shairport-sync.mk | 47 ++++++++++++++++++++++++++++++++
 4 files changed, 116 insertions(+)
 create mode 100644 package/shairport-sync/Config.in
 create mode 100644 package/shairport-sync/S99shairport-sync
 create mode 100644 package/shairport-sync/shairport-sync.mk
package/Config.in +1 -0
index d6cd876..b154219 100644
@@ -1088,6 +1088,7 @@ endif
 	source "package/samba4/Config.in"
 	source "package/sconeserver/Config.in"
 	source "package/ser2net/Config.in"
+	source "package/shairport-sync/Config.in"
 	source "package/smcroute/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
package/shairport-sync/Config.in new file +37 -0
new file mode 100644
index 0000000..bf40524
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_SHAIRPORT_SYNC
+	bool "shairport-sync"
+	depends on BR2_USE_MMU # libdaemon
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa_lib
+	select BR2_PACKAGE_ALSA_LIB
+	select BR2_PACKAGE_LIBDAEMON
+	select BR2_PACKAGE_POLARSSL if !BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_POPT
+	help
+	  Shairport Sync emulates an AirPort Express for the purpose of
+	  streaming audio from iTunes, iPods, iPhones, iPads and AppleTVs.
+	  Audio played by a Shairport Sync-powered device stays in synchrony
+	  with the source and thus with other devices that are playing the same
+	  source synchronously. Thus, for example, synchronised multi-room
+	  audio is possible without difficulty.
+
+	  https://github.com/mikebrady/shairport-sync
+
+if BR2_PACKAGE_SHAIRPORT_SYNC
+
+config BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR
+	bool "libsoxr support"
+	select BR2_PACKAGE_LIBSOXR
+	help
+	  Enable support for libsoxr, the SoX Resampler library.
+
+	  Briefly, Shairport Sync keeps in step with the audio source by
+	  deleting or inserting frames of audio into the stream as needed. This
+	  "interpolation" is normally inaudible, but it can be heard in some
+	  circumstances. Libsoxr allows this interpolation to be done much more
+	  smoothly and subtly.
+
+endif
+
+comment "shairport-sync needs a toolchain w/ threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/shairport-sync/S99shairport-sync new file +31 -0
new file mode 100644
index 0000000..377b0bb
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+NAME=shairport-sync
+DAEMON=/usr/bin/$NAME
+
+# Additional options that are passed to Shairport Sync
+OPTIONS=""
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+case "$1" in
+  start)
+    echo -n "Starting shairport-sync: "
+    start-stop-daemon --start --quiet --exec $DAEMON -- -d $OPTIONS
+    [ $? == 0 ] && echo "OK" || echo "FAIL"
+    ;;
+  stop)
+    echo -n "Stopping shairport-sync: "
+    start-stop-daemon --stop --quiet --name $NAME
+    [ $? == 0 ] && echo "OK" || echo "FAIL"
+    ;;
+  restart)
+    $0 stop
+    $0 start
+    ;;
+  *)
+  echo "Usage: $0 {start|stop|restart}"
+  exit 1
+  ;;
+esac
package/shairport-sync/shairport-sync.mk new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.1.2
#1 lore raw

PATCH v2 1/1 shairplay-sync: new package

Dear J?rg Krause,

Quoted 8 lines · J?rg Krause

---
Changes v1 -> v2:
- autoselect SSL backend instead of a user choice
- autoselect zeroconf backend instead of a user choice
- fix missing select for optional package libsoxr
- fix config option for avahi (--with-avahi instead of --with-openssl)
- add comment to tinysvcmdns in shairport-sync.mk

Applied, after doing a few tweaks:

[Thomas:
- rework init script to be more like other Buildroot init scripts, and fix indentation.
- fix indentation in the .mk file
- remove dependencies on host-autoconf and host-libtool, since the package has AUTORECONF = YES, this is not needed.
- fix licensing informations.]

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 shairplay-sync: new package

Dear Thomas,

Am 25.10.2014 12:29 schrieb Thomas Petazzoni:

Quoted 15 lines

Dear J?rg Krause,

Quoted 9 lines · J?rg Krause

---
Changes v1 -> v2:
- autoselect SSL backend instead of a user choice
- autoselect zeroconf backend instead of a user choice
- fix missing select for optional package libsoxr
- fix config option for avahi (--with-avahi instead of
--with-openssl)
- add comment to tinysvcmdns in shairport-sync.mk

Applied, after doing a few tweaks:

Quoted 7 lines

[Thomas:
- rework init script to be more like other Buildroot init scripts, and fix indentation.
- fix indentation in the .mk file
- remove dependencies on host-autoconf and host-libtool, since the package has AUTORECONF = YES, this is not needed.
- fix licensing informations.]

Many thanks for the thorough review! You even checked the license!

One question to the init script file: shairport-sync uses libdaemon for creating the pidfile. Does this conflicts with the -p switch of start-stop-daemon?

Best regards
J?rg

#3 lore raw

PATCH v2 1/1 shairplay-sync: new package

Dear J?rg Krause,

Quoted 5 lines · J?rg Krause

Many thanks for the thorough review! You even checked the license!

One question to the init script file: shairport-sync uses libdaemon for creating the pidfile. Does this conflicts with the -p switch of start-stop-daemon?

Well, in most cases, we use the daemonization feature of start-stop-daemon rather than the built-in capability of the program to daemonize itself. Which is why I've removed the -d option from shairplay-sync.

Could you check if it continues to work properly for you? On my system, I wasn't able to run shairplay-sync properly, because it seems to require multicast support in the kernel, which wasn't enabled in my case.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com