[PATCH v2] testing/gonic: new aport
Export this patch
https://github.com/sentriz/gonic/
A subsonic compatible music streaming server
---
Sorry, I'd accidentially made two commits
testing/gonic/APKBUILD | 52 +++++++++++++++++++++++++++++++++
testing/gonic/gonic.confd | 7 +++++
testing/gonic/gonic.initd | 19 ++++++++++++
testing/gonic/gonic.pre-install | 6 ++++
4 files changed, 84 insertions(+)
create mode 100644 testing/gonic/APKBUILD
create mode 100644 testing/gonic/gonic.confd
create mode 100644 testing/gonic/gonic.initd
create mode 100644 testing/gonic/gonic.pre-install
diff --git a/testing/gonic/APKBUILD b/testing/gonic/APKBUILD
new file mode 100644
index 0000000000..4fb85d34ff
--- /dev/null
+++ b/testing/gonic/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Alex McGrath <amk@amk.ie>
+# Maintainer: Alex McGrath <amk@amk.ie>
+pkgname=gonic
+pkgver=0.10.0
+pkgrel=0
+pkgdesc="A subsonic compatible music streaming server"
The 'A' is superfluous
+url="https://github.com/sentriz/gonic"
+arch="all"
+license="GPL-3.0"
Please use the SPDX identifier
+subpackages="$pkgname-openrc"
+depends="taglib ffmpeg alsa-lib sqlite"
Remove these, abuild should automatically detect the dependencies on
the libraries
+makedepends="binutils-gold go alsa-lib-dev taglib-dev"
+install="$pkgname.pre-install"
+source="
+ gonic.initd
+ gonic.confd
+ gonic-$pkgver.tar.gz::https://github.com/sentriz/gonic/archive/v$pkgver.tar.gz
+ "
+builddir="$srcdir/$pkgname-$pkgver"
Remove as this is the default value
+
+export GOPATH="$srcdir"
+export GO111MODULES=on
+
+build() {
+ cd $builddir
Remove as build() automatically 'cd' into $builddir
+ ./_do_build_server
+}
+
+check() {
+ cd $builddir
Remove as check() automatically 'cd' into $builddir
+ go test ./...
+}
+
+package() {
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+ install -Dm755 "$builddir"/"$pkgname" \
+ "$pkgdir"/usr/bin/"$pkgname"
+
+}
+
+cleanup_srcdir() {
+ go clean -modcache
+ default_cleanup_srcdir
+}
+
+
+sha512sums="9d571f9980b30c665e051cc0d43e71e7029c473049d0e078d84ff2c001a953b9eebc95b7d45f651d4180a37f29976cc775fa756da1661296d58eb46501901f33 gonic.initd
+473691065ab718c343483cdeca07f9d3254974f681bdbb413a0e618b3dd4fbc089d07107093a482188f11a0a41e48b84ccc7b52a99e57fd60fbb40339f5ffd2e gonic.confd
+f0c925a6bbe92ee23b8a2922c5697d596ca1abffab9e76d15930d15cea828ae7de8cf9ff3a11a151980a9b3455ff314c1129777f277213fbd977ccc9c9a6d9bf gonic-0.10.0.tar.gz"
diff --git a/testing/gonic/gonic.confd b/testing/gonic/gonic.confd
new file mode 100644
index 0000000000..1d14d8d0fe
--- /dev/null
+++ b/testing/gonic/gonic.confd
@@ -0,0 +1,7 @@
+# conf.d file for gonic
+
+#
+# Specify daemon options here.
+#
+MUSIC_PATH=""
+GONIC_OPTS="-music-path=$MUSIC_PATH -db-path=/var/lib/gonic/gonic.db"
diff --git a/testing/gonic/gonic.initd b/testing/gonic/gonic.initd
new file mode 100644
index 0000000000..d7f331ac8e
--- /dev/null
+++ b/testing/gonic/gonic.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+name=gonic
+command="/usr/bin/gonic"
+command_args="$GONIC_OPTS"
+command_background=true
+pidfile="/var/run/${RC_SVCNAME}.pid"
+error_log="/var/log/gonic.log"
+command_user="gonic:gonic"
+
+start_pre() {
+ checkpath -W --owner "$command_user" --mode 0644 \
+ /var/log/gonic.log
+}
+
+depend() {
+ need net
+ after firewall
+}
\ No newline at end of file
diff --git a/testing/gonic/gonic.pre-install b/testing/gonic/gonic.pre-install
new file mode 100644
index 0000000000..fcf0352fc2
--- /dev/null
+++ b/testing/gonic/gonic.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S gonic 2>/dev/null
+adduser -S -D -H -s /bin/false -G gonic -g gonic gonic 2>/dev/null
+
+exit 0
Please open this patch as a merge request on
gitlaba.alpinelinux.org/alpine/aports
--
2.26.2