Bug#743638: RFP: shairport -- Play music streamed from iTunes/iPads/iPods

2015-12-21 Thread Daniel Carter
Now switching my ubuntu ppa builds to fork from this.  I've got a branch
for precise, which uses systemv and thus pre-jessie users find the patch of
interest, fairly obvious/trivial packaging change apart from the patch to
compile against older libconfig (would be needed for squeeze also)

https://github.com/dantheperson/shairport-sync-collab-maint/commit/b512e586830dcc2c281c534b5a5c0f0ca9221d50

Regards,
Dan.


Bug#743638: RFP: shairport -- Play music streamed from iTunes/iPads/iPods

2015-12-20 Thread Daniel Carter
On Sun, 20 Dec 2015 09:47:23 + Chris Boot  wrote:
>
> I would *definitely* appreciate patches from anyone who wishes to help,
> or even co-maintenance.

Nice work.

I just put a bit of effort into getting the systemd service side of things
working.  Happy to contribute those, see attached diff. (not sure how
alioth works, cant see how to do a pull request there?).  The patch for the
systemd unit path i have done a pull request for, so if that is accepted
you can drop that.

Though perhaps you intend this not to be a daemon package?

Regards,
Dan.
diff --git a/debian/control b/debian/control
index d7b5e00..c777519 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: shairport-sync
 Section: sound
 Priority: extra
 Maintainer: Chris Boot 
-Build-Depends: debhelper (>= 9), dh-autoreconf, dh-systemd, libasound2-dev, 
libavahi-client-dev, libconfig-dev, libdaemon-dev, libpopt-dev, libpulse-dev, 
libsoxr-dev, libssl-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, dh-systemd, systemd, 
libasound2-dev, libavahi-client-dev, libconfig-dev, libdaemon-dev, libpopt-dev, 
libpulse-dev, libsoxr-dev, libssl-dev
 Standards-Version: 3.9.6
 Homepage: https://github.com/mikebrady/shairport-sync
 Vcs-Git: git://anonscm.debian.org/collab-maint/shairport-sync.git
@@ -10,7 +10,7 @@ Vcs-Browser: 
http://anonscm.debian.org/cgit/collab-maint/shairport-sync.git/
 
 Package: shairport-sync
 Architecture: linux-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
 Description: AirPlay audio player
  Plays audio streamed from iTunes, iOS devices and third-party AirPlay
  sources such as ForkedDaapd and others. Audio played by a Shairport
diff --git a/debian/patches/correct-systemd-unit-path.diff 
b/debian/patches/correct-systemd-unit-path.diff
new file mode 100644
index 000..84b8f6c
--- /dev/null
+++ b/debian/patches/correct-systemd-unit-path.diff
@@ -0,0 +1,36 @@
+--- a/Makefile.am
 b/Makefile.am
+@@ -61,6 +61,6 @@ if INSTALL_SYSTEMV
+   [ -f $(DESTDIR)/etc/init.d/shairport-sync ] || cp 
scripts/shairport-sync $(DESTDIR)/etc/init.d/
+ endif
+ if INSTALL_SYSTEMD
+-  [ -e $(DESTDIR)/usr/lib/systemd/system ] || mkdir -p 
$(DESTDIR)/usr/lib/systemd/system
+-  cp scripts/shairport-sync.service $(DESTDIR)/usr/lib/systemd/system
++  [ -e $(DESTDIR)$(systemdsystemunitdir) ] || mkdir -p 
$(DESTDIR)$(systemdsystemunitdir)
++  cp scripts/shairport-sync.service $(DESTDIR)$(systemdsystemunitdir)
+ endif
+--- a/configure.ac
 b/configure.ac
+@@ -213,6 +213,22 @@ AC_ARG_WITH(dns_sd, [  --with-dns_sd = c
+   AC_SEARCH_LIBS([DNSServiceRefDeallocate], [dns_sd], , AC_MSG_ERROR(dns_sd 
support requires the dns_sd library!))], )
+ AM_CONDITIONAL([USE_DNS_SD], [test "x$HAS_DNS_SD" = "x1"])
+ 
++# Find systemd unit dir
++AC_ARG_WITH([systemdsystemunitdir],
++ [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for 
systemd service files])],,
++ [with_systemdsystemunitdir=auto])
++AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o 
"x$with_systemdsystemunitdir" = "xauto"], [
++ def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir 
systemd)
++
++ AS_IF([test "x$def_systemdsystemunitdir" = "x"],
++   [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
++[AC_MSG_ERROR([systemd support requested but pkg-config unable to query 
systemd package])])
++with_systemdsystemunitdir=no],
++   [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
++AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
++  [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
++AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
++
+ # Checks for header files.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS([getopt_long.h])
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000..6a10cf6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+correct-systemd-unit-path.diff
+use-usr-bin-not-usr-local-bin-in-systemd.diff
+use-usr-bin-not-usr-local-bin-in-init.diff
diff --git a/debian/patches/use-usr-bin-not-usr-local-bin-in-init.diff 
b/debian/patches/use-usr-bin-not-usr-local-bin-in-init.diff
new file mode 100644
index 000..9340d5b
--- /dev/null
+++ b/debian/patches/use-usr-bin-not-usr-local-bin-in-init.diff
@@ -0,0 +1,11 @@
+--- a/scripts/shairport-sync
 b/scripts/shairport-sync
+@@ -17,7 +17,7 @@
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DESC="AirPlay Synchronous Audio Service"
+ NAME=shairport-sync
+-DAEMON=/usr/local/bin/$NAME
++DAEMON=/usr/bin/$NAME
+ 
+ # We don't use the DAEMON_ARGS variable here because some of the identifiers 
may have spaces in them, and so are
+ # impossible to pass as arguments.
diff --git a/debian/patches/use-usr-bin-not-usr-local-bin-in-systemd.diff 
b/debian/patches/use-usr-bin-not-usr-local-bin-in-systemd.diff
new file mode 100644
index 000..2b1571c
--- /dev/null
+++ b/debian/patches/use-usr-bin-not-usr-local-bin

Bug#743638: RFP: shairport -- Play music streamed from iTunes/iPads/iPods

2015-12-19 Thread Daniel Carter
Hi Folks,

Mikes just pointed me at this effort.  I've setup a debian package for
this, which you may or may not find worthy for re-use (I'm a total newbie
at packaging).  In particular i did take the time to fill out the copyright
file, but i did this based on the claims in the licenses file, i didn't do
any forensic work tracing the forks through github.

https://launchpad.net/~dantheperson/+archive/ubuntu/shairplay-sync

*https://github.com/dantheperson/packaging/tree/master/shairport-sync/debian
*

Regards,
Dan.

-- 
Sent from my computer