From f534bdfeb86f29b56890c8aacb5e9c8e30a4f5e2 Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 16 Dec 2021 13:42:50 +0000 Subject: [PATCH] Add initial APKBUILD for shairport-sync and nqptp --- nqptp/APKBUILD | 35 +++++++++++++++++++ nqptp/nqptp.initd | 14 ++++++++ shairport-sync/APKBUILD | 52 +++++++++++++++++++++++++++++ shairport-sync/shairport-sync.initd | 11 ++++++ 4 files changed, 112 insertions(+) create mode 100644 nqptp/APKBUILD create mode 100644 nqptp/nqptp.initd create mode 100644 shairport-sync/APKBUILD create mode 100644 shairport-sync/shairport-sync.initd diff --git a/nqptp/APKBUILD b/nqptp/APKBUILD new file mode 100644 index 0000000..bea87d2 --- /dev/null +++ b/nqptp/APKBUILD @@ -0,0 +1,35 @@ +# Maintainer: hoellen +pkgname=nqptp +pkgver=0.1 +pkgrel=0 +pkgdesc="Not Quite PTP. A daemon that monitors timing data from any PTP clocks." +url="https://github.com/mikebrady/nqptp" +arch="all" +license="GPL-2.0-or-later" +makedepends="autoconf automake libtool git" +subpackages="$pkgname-openrc" +source="$pkgname.initd" +options=!check + +builddir="$srcdir/$pkgname" + +prepare() { + git clone $url $builddir + cd $builddir + default_prepare + autoreconf -i -f +} + +build() { + ./configure --prefix=/usr --localstatedir=/var + make +} + +package() { + cd $builddir + make DESTDIR="$pkgdir" install + install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + + +sha512sums="8af548879c307a67c818377a4e18f7c6f3ad824f56c5d8d8be15598c816e2e2160cfcecde5953253deb5b3001bb2637261ef05499cb9d64a08e64c381ef82916 nqptp.initd" diff --git a/nqptp/nqptp.initd b/nqptp/nqptp.initd new file mode 100644 index 0000000..41ed0d0 --- /dev/null +++ b/nqptp/nqptp.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name="nqptp" +description="A daemon that monitors timing data from any PTP clocks" +command="/usr/bin/nqptp" +command_background="yes" + +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need net localmount +} + +# ToDO: run as user nqptp: setcap 'cap_net_bind_service=+ep' /usr/local/bin/nqptp diff --git a/shairport-sync/APKBUILD b/shairport-sync/APKBUILD new file mode 100644 index 0000000..f2f4aa1 --- /dev/null +++ b/shairport-sync/APKBUILD @@ -0,0 +1,52 @@ +# Maintainer: hoellen +pkgname=shairport-sync +pkgver=4.1 +pkgrel=0 +pkgdesc="AirTunes emulator. Shairport Sync adds multi-room capability with Audio Synchronisation" +url="https://github.com/mikebrady/shairport-sync" +arch="all" +license="custom" +depends="avahi" +makedepends="autoconf automake build-base libtool alsa-lib-dev popt-dev + openssl-dev soxr-dev avahi-dev libconfig-dev libplist-dev libsodium-dev + libgcrypt-dev ffmpeg-dev xxd xmltoman git" +subpackages="$pkgname-doc $pkgname-openrc" +source="$pkgname.initd" +options=!check + +builddir="$srcdir/$pkgname" + +prepare() { + git clone $url $builddir + cd $builddir + git checkout development + default_prepare + autoreconf -i -f +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-piddir=/run \ + --with-alsa \ + --with-avahi \ + --with-ssl=openssl \ + --with-soxr \ + --with-airplay-2 + make +} + +package() { + cd $builddir + make DESTDIR="$pkgdir" install + install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + + +sha512sums="a8ef971363561ed8cfbebcfc2adff1c429fa2d0e436dacd50d01872d645d4c055826614687068e7f1fc77139727027d2e2a5f5999c486657f6fd3bf4da85d01d shairport-sync.initd" diff --git a/shairport-sync/shairport-sync.initd b/shairport-sync/shairport-sync.initd new file mode 100644 index 0000000..e8280eb --- /dev/null +++ b/shairport-sync/shairport-sync.initd @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +description="A synchronous (multi-room-capable) AirPlay receiver." +command="/usr/bin/shairport-sync" +command_background="yes" + +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need net localmount avahi-daemon nqptp +}