summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Pertin2020-06-15 13:10:55 +0200
committerDimitri Pertin2020-06-15 13:10:55 +0200
commit50937239fac18ff207f36a3e60429b3669c1f701 (patch)
treeebef77c34f45ceb0cc65d2a501094c928f95153f
parent6d74e279db128ed6d67ae01ab147c3ca8e80561f (diff)
downloadaur-50937239fac18ff207f36a3e60429b3669c1f701.tar.gz
Update to 0.9.2
The daemon configuration used to be managed inside the systemd unit with environment variables. This commit brings modifications and relies on: 1. the systemd unit provided by the gonic repository 2. the configuration file also provided which is now `/var/lib/gonic/config` Both files are patched to match archlinux guidelines.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD24
-rw-r--r--gonic.config.patch10
-rw-r--r--gonic.install2
-rw-r--r--gonic.service.patch29
5 files changed, 65 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f5352331b66b..601ccad7801e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gonic
pkgdesc = A lightweight music streaming server which implements the Subsonic API
- pkgver = 0.9.1
+ pkgver = 0.9.2
pkgrel = 1
url = https://github.com/sentriz/gonic
install = gonic.install
@@ -12,15 +12,17 @@ pkgbase = gonic
depends = sqlite
depends = taglib
optdepends = ffmpeg: on-the-fly audio transcoding and caching
- backup = usr/lib/systemd/system/gonic.service
- source = gonic-0.9.1.tar.gz::https://github.com/sentriz/gonic/archive/v0.9.1.tar.gz
+ backup = var/lib/gonic/config
+ source = gonic-0.9.2.tar.gz::https://github.com/sentriz/gonic/archive/v0.9.2.tar.gz
+ source = gonic.config.patch
source = gonic.install
- source = gonic.service
+ source = gonic.service.patch
source = gonic.sysusers
source = gonic.tmpfiles
- md5sums = 6207ac99cc58d357229f161e66b2eefd
- md5sums = 1b70d272745c2c4cf5ea3be9445f508d
- md5sums = 42cafc55316a6fa709eb873afe037a6d
+ md5sums = 0dca2c5c075716ae8ab1be2709f4d519
+ md5sums = 240faa29e218962b1ed6c4ce4d138248
+ md5sums = d6e8eda0411af60e613819ac957fcc56
+ md5sums = c8f973db7a107f8653f7ff36555ce1a0
md5sums = 6ca6715be2cdd424846f7b37b98905f6
md5sums = 487fe9a172e33d86514cf3dbb3b629b8
diff --git a/PKGBUILD b/PKGBUILD
index d51db55579aa..2b4050d5d74a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Dimitri Pertin <pertin (dot) dimitri (at) protonmail (dot) com>
pkgname=gonic
-pkgver=0.9.1
+pkgver=0.9.2
pkgrel=1
pkgdesc='A lightweight music streaming server which implements the Subsonic API'
arch=('x86_64')
@@ -9,19 +9,26 @@ makedepends=('go')
optdepends=('ffmpeg: on-the-fly audio transcoding and caching')
url='https://github.com/sentriz/gonic'
license=('GPL3')
-backup=("usr/lib/systemd/system/$pkgname.service")
+backup=("var/lib/gonic/config")
install="$pkgname.install"
source=("$pkgname-$pkgver.tar.gz::https://github.com/sentriz/gonic/archive/v$pkgver.tar.gz"
+ "$pkgname.config.patch"
"$pkgname.install"
- "$pkgname.service"
+ "$pkgname.service.patch"
"$pkgname.sysusers"
"$pkgname.tmpfiles")
-md5sums=('6207ac99cc58d357229f161e66b2eefd'
- '1b70d272745c2c4cf5ea3be9445f508d'
- '42cafc55316a6fa709eb873afe037a6d'
+md5sums=('0dca2c5c075716ae8ab1be2709f4d519'
+ '240faa29e218962b1ed6c4ce4d138248'
+ 'd6e8eda0411af60e613819ac957fcc56'
+ 'c8f973db7a107f8653f7ff36555ce1a0'
'6ca6715be2cdd424846f7b37b98905f6'
'487fe9a172e33d86514cf3dbb3b629b8')
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch --forward --strip=1 -i "../$pkgname.config.patch"
+ patch --forward --strip=1 -i "../$pkgname.service.patch"
+}
build() {
export CGO_LDFLAGS="${LDFLAGS}"
@@ -31,11 +38,12 @@ build() {
}
package() {
- install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -Dm644 "$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
cd "$srcdir/$pkgname-$pkgver"
- install -Dm755 ${pkgname} "$pkgdir/usr/bin/${pkgname}"
+ install -Dm755 "${pkgname}" "$pkgdir/usr/bin/${pkgname}"
+ install -Dm644 "contrib/config" "$pkgdir/var/lib/gonic/config"
+ install -Dm644 "contrib/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}
diff --git a/gonic.config.patch b/gonic.config.patch
new file mode 100644
index 000000000000..96ef2e1a5781
--- /dev/null
+++ b/gonic.config.patch
@@ -0,0 +1,10 @@
+--- a/contrib/config
++++ b/contrib/config
+@@ -1,6 +1,6 @@
+ music-path
+ cache-path /tmp/gonic_cache
+-db-path /var/gonic/gonic.db
++db-path /var/lib/gonic/gonic.db
+ jukebox-enabled false
+ listen-addr 127.0.0.1:4747
+ proxy-prefix /gonic
diff --git a/gonic.install b/gonic.install
index 38f0046d9887..d5bc1cbe8704 100644
--- a/gonic.install
+++ b/gonic.install
@@ -2,7 +2,7 @@
post_install() {
echo "To make gonic fully functional, consider performing the following actions:"
echo " + Configure the gonic daemon:"
- echo " $ sudo vim /usr/lib/systemd/system/gonic.service"
+ echo " $ sudo vim /var/lib/gonic/config"
echo " + Start the gonic daemon:"
echo " $ sudo systemctl start gonic"
echo " + (OPTIONAL) Start the gonic daemon at boot:"
diff --git a/gonic.service.patch b/gonic.service.patch
new file mode 100644
index 000000000000..d0090b8fb154
--- /dev/null
+++ b/gonic.service.patch
@@ -0,0 +1,29 @@
+--- a/contrib/gonic.service
++++ b/contrib/gonic.service
+@@ -1,6 +1,5 @@
+ [Unit]
+ Description=Gonic service
+-ConditionPathExists=/var/gonic/gonic
+ After=network.target
+
+ [Service]
+@@ -12,17 +11,8 @@
+ Restart=on-failure
+ RestartSec=10
+
+-WorkingDirectory=/var/gonic/
+-ExecStart=/var/gonic/gonic -config-path /var/gonic/config
++ExecStart=/usr/bin/gonic -config-path /var/lib/gonic/config
+-
+-# make sure log directory exists and owned by syslog
+-PermissionsStartOnly=true
+-ExecStartPre=/bin/mkdir -p /var/log/gonic
+-ExecStartPre=/bin/chown syslog:adm /var/log/gonic
+-ExecStartPre=/bin/chmod 755 /var/log/gonic
+-StandardOutput=syslog
+-StandardError=syslog
+-SyslogIdentifier=sleepservice
+
+ [Install]
+ WantedBy=multi-user.target
++