Skip to content

Instantly share code, notes, and snippets.

@andresilva
Last active December 25, 2015 12:49
Show Gist options
  • Save andresilva/6979211 to your computer and use it in GitHub Desktop.
Save andresilva/6979211 to your computer and use it in GitHub Desktop.
Shairport pkg
pkgname=shairport
pkgver=1.0
pkgrel=1
pkgdesc="An AirPlay-compatible audio receiver"
arch=('i686' 'x86_64' 'armv6h')
url="https://github.com/abrasive/shairport"
license=('public-domain')
depends=('avahi' 'glibc' 'pkgconfig' 'libao' 'openssl')
makedepends=('git' 'libao' 'openssl')
provides=(shairport)
source=(
'git://github.com/abrasive/shairport.git#branch=1.0-dev'
'shairport.service')
md5sums=(
'SKIP'
'4c1602358cfed8fbf4d6009b06a98eac')
build() {
cd "$srcdir"/shairport
./configure
make
}
package() {
cd "$srcdir"/shairport
install -Dm755 ../shairport\.service "${pkgdir}"/usr/lib/systemd/system/shairport\.service
make PREFIX="$pkgdir/usr" install
install -Dm644 LICENSES "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSES
install -Dm644 README.md "${pkgdir}"/usr/share/doc/${pkgname}/README.md
}
[Unit]
Description=Daemon to enable AirPlay Server
Requires=avahi-daemon.service
After=avahi-daemon.service
[Service]
Type=forking
PIDFile=/var/run/shairport.pid
ExecStart=/bin/sh -c '/usr/bin/shairport -d --pidfile=/var/run/shairport.pid -a $(/bin/hostname)'
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment