From 2d14955dc95629a4ac312ef4b8a961db9e0b255b Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Fri, 17 Mar 2017 18:23:43 +0000 Subject: [PATCH] add shairplay --- shairplay/PKGBUILD | 56 +++++++++++++++++++++++++++++++++++++ shairplay/shairplay.service | 13 +++++++++ 2 files changed, 69 insertions(+) create mode 100644 shairplay/PKGBUILD create mode 100644 shairplay/shairplay.service diff --git a/shairplay/PKGBUILD b/shairplay/PKGBUILD new file mode 100644 index 000000000..976b28d99 --- /dev/null +++ b/shairplay/PKGBUILD @@ -0,0 +1,56 @@ +# $Id$ +# Maintainer: BlackIkeEagle +# Contributor: winlu + +pkgname=shairplay +_commit=ce80e00 +pkgver=20160101.ce80e00 +pkgrel=1 +pkgdesc='Apple airplay and raop protocol server' +arch=('i686' 'x86_64') +url='https://github.com/juhovh/shairplay' +license=('custom') +depends=('libao') +optdepends=('avahi: to run the server') +makedepends=('git') +source=( + "$pkgname::git://github.com/juhovh/shairplay.git#commit=$_commit" + 'shairplay.service' +) +sha256sums=('SKIP' + 'f0a176539a6c5be46dc832d054be2f18c3256e5fd34c5f1416c9463bd75c82b3') +options=(!libtool) + +pkgver() { + cd "$pkgname" + git log -1 --date=short --format="%cd.%h" | tr -d '-' +} + +build() { + cd "$pkgname" + + # installing airport.key to /etc/shairplay/ + sed 's/airport.key/\/etc\/shairplay\/airport.key/' -i "$srcdir/$pkgname"/src/shairplay.c + + ./autogen.sh + ./configure --prefix=/usr/ + make +} + + +package() { + cd "$pkgname" + make DESTDIR="$pkgdir" install + + # install systemd service file + install -Dm644 "$srcdir/shairplay.service" "$pkgdir/usr/lib/systemd/system/shairplay.service" + + # install key file + install -Dm644 airport.key "$pkgdir/etc/shairplay/airport.key" + + # install license file + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # install documentation + install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" +} diff --git a/shairplay/shairplay.service b/shairplay/shairplay.service new file mode 100644 index 000000000..a62438412 --- /dev/null +++ b/shairplay/shairplay.service @@ -0,0 +1,13 @@ +[Unit] +Description=Apple airplay and raop protocol server +Requires=network.target sound.target +Wants=avahi-daemon.service +After=avahi-daemon.service + +[Service] +Type=simple +ExecStart=/usr/bin/shairplay -a %H +Restart=always + +[Install] +WantedBy=multi-user.target