summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlphaJack2021-10-14 00:52:04 +0200
committerAlphaJack2021-10-14 00:52:16 +0200
commit55563d611ff0616db8612ce609d6cee8f6343f9c (patch)
treec37da4e856a36781a92ef437bfd94a8d4c934e7f /PKGBUILD
parent75f683a12e830f5ae7df6a6650fbea991f21d82d (diff)
downloadaur-55563d611ff0616db8612ce609d6cee8f6343f9c.tar.gz
Adopted package and updated mStream to 5.7.2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD81
1 files changed, 55 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 58b330fbf92d..92e38590ce62 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,59 @@
-# Maintainer: Espen Fossen <espfos@junta.no>
+# Maintainer: AlphaJack <alphajack at tuta dot io>
-pkgname=mstream
-pkgver=4.6.1
+pkgname="mstream"
+pkgver=5.7.2
pkgrel=1
-pkgdesc='Music player server with a web-based interface'
-arch=('any')
-url="http://mstream.io"
-license=('GPL3')
-depends=('nodejs')
-makedepends=('npm')
-install=mstream.install
-backup=('var/lib/mstream/config.json')
-source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz
- mstream.service
- config.json)
-noextract=($pkgname-$pkgver.tgz)
+pkgdesc="Music player server with a web-based interface"
+url="https://mstream.io"
+license=("GPL3")
+arch=("any")
+provides=("mstream")
+conflicts=("nodejs-mstream" "mstream-git")
+replaces=("mstream-git")
+depends=("nodejs")
+makedepends=("npm")
+source=("https://github.com/IrosTheBeggar/mStream/archive/refs/tags/v$pkgver.tar.gz"
+ "mstream.json"
+ "mstream.service"
+ "mstream.sysusers"
+ "mstream.tmpfiles")
+sha256sums=('960d1cafaf5b3f89380f414728f95252bf38b067fbe7e8ce841eeaebd44014ce'
+ '1d6faa9e1a76d13f3ab8558a3640158b1f0a54f624a4e37ddc3ef41ed4191058'
+ '833f86daaffb12857612ef5b1264e944b0a48a077d5a8bb8d217ec6565ed90c3'
+ '5f2e6aced1707f64ca4ae3ae647fb6a8420f5c2a747ba06fa9174920fd821437'
+ '3664207c5b2782d55acc77a6ff1ced5c80447047c4c036837983dc03e19896de')
+backup=("etc/mstream.json")
+options=("!strip")
-package() {
- npm install -g --user root --prefix "$pkgdir"/usr $pkgname-$pkgver.tgz
- install -d -g 49 -o 49 "${pkgdir}/var/log/${pkgname}"
- install -d -g 49 -o 49 "${pkgdir}/var/lib/${pkgname}"
- install -d -g 49 -o 49 "${pkgdir}/var/lib/${pkgname}/media"
- install -d -g 49 -o 49 "${pkgdir}/var/lib/${pkgname}/album-art"
- install -Dm644 mstream.service "$pkgdir"/usr/lib/systemd/system/mstream.service
- install -Dm644 -g 49 -o 49 config.json "${pkgdir}/var/lib/${pkgname}/config.json"
+package(){
+ # archiving the folder because `npm install` doesn't move the files to $pkgdir
+ tar czf "mStream.tar.gz" -C "mStream-$pkgver" .
+ npm install -g --user root --prefix "$pkgdir/usr" "mStream.tar.gz"
+
+ install -d -m 750 "$pkgdir/var/cache/mstream"
+ install -d -m 750 "$pkgdir/var/lib/mstream"
+ install -d "$pkgdir/var/lib/mstream/album-art"
+ install -d "$pkgdir/var/lib/mstream/db"
+ install -d "$pkgdir/var/lib/mstream/media"
+ install -d "$pkgdir/var/lib/mstream/sync"
+ install -d "$pkgdir/var/log/mstream"
+
+ install -D -m 600 "$srcdir/mstream.json" "$pkgdir/etc/mstream.json"
+ install -D -m 644 "$srcdir/mstream.service" "$pkgdir/usr/lib/systemd/system/mstream.service"
+ install -D -m 644 "$srcdir/mstream.sysusers" "$pkgdir/usr/lib/sysusers.d/mstream.conf"
+ install -D -m 644 "$srcdir/mstream.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/mstream.conf"
+
+ rm -r "$pkgdir/usr/lib/node_modules/mstream/.github" \
+ "$pkgdir/usr/lib/node_modules/mstream/.npmignore" \
+ "$pkgdir/usr/lib/node_modules/mstream/bin" \
+ "$pkgdir/usr/lib/node_modules/mstream/image-cache/" \
+ "$pkgdir/usr/lib/node_modules/mstream/save/db" \
+ "$pkgdir/usr/lib/node_modules/mstream/save/sync" \
+ "$pkgdir/usr/lib/node_modules/mstream/save/logs"
+
+ chown -R root: "$pkgdir/usr"
+ ln -s "/var/cache/mstream" "$pkgdir/usr/lib/node_modules/mstream/image-cache"
+ ln -s "/var/lib/mstream/db" "$pkgdir/usr/lib/node_modules/mstream/save/db"
+ ln -s "/var/lib/mstream/sync" "$pkgdir/usr/lib/node_modules/mstream/save/sync"
+ ln -s "/var/log/mstream" "$pkgdir/usr/lib/node_modules/mstream/save/logs"
}
-md5sums=('f8d978ade28d77a280e1c8112aa034f8'
- '6640e102dd29a6da5c4c075e4c4042d7'
- 'a38cbd06e4077f83926e1c06f380ae83')