summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkrtansh Rajput2021-04-29 15:21:12 -0500
committerSkrtansh Rajput2021-04-29 15:21:12 -0500
commitf9cb7adb917bfee568b1ef70dbc9e5b5b19b8a08 (patch)
tree9311a1469b1887243e54fb9c3ac8c56de754ca3b
parent373638d2827355447386d872895c446acd6f899e (diff)
downloadaur-f9cb7adb917bfee568b1ef70dbc9e5b5b19b8a08.tar.gz
added .service and .toml files
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD21
-rw-r--r--navidrome.service47
-rw-r--r--navidrome.toml6
-rwxr-xr-xupdate.sh17
5 files changed, 86 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7faa4512f26c..9728ebe8706e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,8 +16,13 @@ pkgbase = navidrome-git
depends = ffmpeg
provides = navidrome
conflicts = navidrome
+ conflicts = navidrome-systemd
source = navidrome-git::git+https://github.com/deluan/navidrome.git
+ source = navidrome.service
+ source = navidrome.toml
sha256sums = SKIP
+ sha256sums = f35e82317c2e5c87577337d64347c4e5baf12e24e0a7544bbc171c9b37cdfdd4
+ sha256sums = 6e2ef6b6b734abbbae0422bdb4e79f79169962fd9c595d19492612eecf75f579
pkgname = navidrome-git
diff --git a/PKGBUILD b/PKGBUILD
index cde886ca85e4..d7d89fe11a1d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,24 @@
-# Maintainer: thelostpolaris <thelostpolaris [at] gmail [dot] com>
+# Maintainer: thelostpolaris <me [at] lostpolaris [dot] com>
pkgbase='navidrome-git'
pkgname=(navidrome-git)
-pkgver=v0.42.0.r0.gf1bd736b
+pkgver=v0.42.0.r15.gbcda53f1
pkgrel=1
pkgdesc='Music Server and Streamer compatible with Subsonic/Airsonic'
url='https://www.navidrome.org/'
license=('GPL3')
arch=(x86_64 armv6h armv7h aarch64)
provides=('navidrome')
-conflicts=('navidrome')
+conflicts=('navidrome' 'navidrome-systemd')
makedepends=('go' 'git' 'npm' 'taglib' 'nodejs-lts-fermium')
depends=('ffmpeg')
-source=('navidrome-git::git+https://github.com/deluan/navidrome.git')
-sha256sums=('SKIP')
+source=('navidrome-git::git+https://github.com/deluan/navidrome.git'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+sha256sums=('SKIP'
+ 'f35e82317c2e5c87577337d64347c4e5baf12e24e0a7544bbc171c9b37cdfdd4'
+ '6e2ef6b6b734abbbae0422bdb4e79f79169962fd9c595d19492612eecf75f579')
pkgver() {
cd "${srcdir}/${pkgname}"
@@ -29,6 +34,10 @@ build() {
}
package() {
- install -Dm755 "${srcdir}/${pkgname}/navidrome" "$pkgdir/usr/bin/navidrome"
+ install -d -o navidrome -g navidrome "${pkgdir}/usr/bin/navidrome"
+ install -d -o navidrome -g navidrome "${pkgdir}/var/lib/navidrome"
+ install -Dm 755 "${srcdir}/${pkgname}/navidrome" "$pkgdir/usr/bin/navidrome"
+ install -Dm 644 "${srcdir}/navidrome.service" -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm 644 "${srcdir}/navidrome.toml" -t "${pkgdir}/var/lib/navidrome"
}
diff --git a/navidrome.service b/navidrome.service
new file mode 100644
index 000000000000..d9f35ec5c352
--- /dev/null
+++ b/navidrome.service
@@ -0,0 +1,47 @@
+[Unit]
+Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
+After=remote-fs.target network.target
+AssertPathExists=/var/lib/navidrome
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+User=navidrome
+Group=navidrome
+Type=simple
+ExecStart=/var/lib/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
+WorkingDirectory=/var/lib/navidrome
+TimeoutStopSec=20
+KillMode=process
+Restart=on-failure
+
+# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
+DevicePolicy=closed
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateUsers=yes
+ProtectControlGroups=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
+RestrictNamespaces=yes
+RestrictRealtime=yes
+SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
+ReadWritePaths=/var/lib/navidrome
+
+# You can uncomment the following line if you're not using the jukebox This
+# will prevent navidrome from accessing any real (physical) devices
+#PrivateDevices=yes
+
+# You can change the following line to `strict` instead of `full` if you don't
+# want navidrome to be able to write anything on your filesystem outside of
+# /var/lib/navidrome.
+ProtectSystem=full
+
+# You can uncomment the following line if you don't have any media in /home/*.
+# This will prevent navidrome from ever reading/writing anything there.
+#ProtectHome=true
+
+# You can customize some Navidrome config options by setting environment variables here. Ex:
+#Environment=ND_BASEURL="/navidrome"
diff --git a/navidrome.toml b/navidrome.toml
new file mode 100644
index 000000000000..94ff1ef94077
--- /dev/null
+++ b/navidrome.toml
@@ -0,0 +1,6 @@
+MusicFolder = "/var/lib/Music"
+#LastFM.ApiKey = ""
+#LastFM.Secret = ""
+#Spotify.ID = ""
+#Spotify.Secret = ""
+#DevActivityPanel = false \ No newline at end of file
diff --git a/update.sh b/update.sh
index acec2cb8f965..bf1354595d3c 100755
--- a/update.sh
+++ b/update.sh
@@ -13,7 +13,7 @@ if [[ $# == 1 ]]; then
fi
printf '' > PKGBUILD
-echo "# Maintainer: thelostpolaris <thelostpolaris [at] gmail [dot] com>
+echo "# Maintainer: lostpolaris <me [at] lostpolaris [dot] com>
pkgbase='${AUR_NAME}'
pkgname=(${AUR_NAME})
@@ -24,10 +24,14 @@ url='${URL}'
license=('${LICENSE}')
arch=(x86_64 armv6h armv7h aarch64)
provides=('${EXECUTABLE_NAME}')
-conflicts=('${EXECUTABLE_NAME}')
+conflicts=('${EXECUTABLE_NAME}' '${EXECUTABLE_NAME}-systemd')
+backup=('var/lib/${EXECUTABLE_NAME}/${EXECUTABLE_NAME}.toml')
makedepends=('go' 'git' 'npm' 'taglib' 'nodejs-lts-fermium')
depends=('ffmpeg')
-source=('${AUR_NAME}::git+https://github.com/deluan/navidrome.git')
+source=('${AUR_NAME}::git+https://github.com/deluan/navidrome.git'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
sha256sums=('SKIP')
pkgver() {
@@ -44,10 +48,15 @@ build() {
}
package() {
- install -Dm755 \"\${srcdir}/\${pkgname}/navidrome\" \"\$pkgdir/usr/bin/${EXECUTABLE_NAME}\"
+ install -d -o navidrome -g navidrome \"\${pkgdir}/usr/bin/${EXECUTABLE_NAME}\"
+ install -d -o navidrome -g navidrome \"\${pkgdir}/var/lib/${EXECUTABLE_NAME}\"
+ install -Dm 755 \"\${srcdir}/\${pkgname}/navidrome\" \"\$pkgdir/usr/bin/${EXECUTABLE_NAME}\"
+ install -Dm 644 \"\${srcdir}/navidrome.service\" -t \"\${pkgdir}/usr/lib/systemd/system\"
+ install -Dm 644 \"\${srcdir}/navidrome.toml\" -t \"\${pkgdir}/var/lib/${EXECUTABLE_NAME}\"
}
" >> PKGBUILD
+updpkgsums
makepkg --printsrcinfo > .SRCINFO
# Test