summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cbb8aa04f9abc7189558f65ee8e087c7ddb654bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: AlphaJack <alphajack at tuta dot io>

pkgname="lms-git"
pkgver=v3.21.0.r0.gb02b8e1
pkgrel=1
pkgdesc="Lightweight Music Server. Access your self-hosted music using a web interface"
url="https://github.com/epoupon/lms"
license=("GPL3")
arch=("x86_64" "armv7h")
depends=("ffmpeg"
        "libconfig"
        "libtaginfo"
        "wt")
makedepends=(
        "boost"
        "cmake"
        "graphicsmagick"
        "pstreams")
source=("$pkgname::git+$url.git"
        "lms.sysusers"
        "lms.service"
        "lms.tmpfiles")
sha256sums=("SKIP"
            "04bda76b610b7d61dfcad355a5ca18c794df417e1b3172d7419c93170446da41"
            "e52499370746e696f18271db3703853475c6565e10f73e1e3514868a327db3d1"
            "32f537bf3480fbe55d0a9929ba633718fbc16887a68e0ba1a2b3b265c400ed41")
backup=("etc/lms.conf")

pkgver(){
 cd "$pkgname"
 git describe --long --tags | sed "s/\([^-]*-g\)/r\1/;s/-/./g"
}

build(){
 cd "$pkgname"
 rm -rf build
 mkdir build
 cd build
 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
 make
}

package(){
 install -d "$pkgdir/var/lib/lms"
 install -D -m 644 "lms.service" "$pkgdir/usr/lib/systemd/system/lms.service"
 install -D -m 644 "lms.sysusers" "$pkgdir/usr/lib/sysusers.d/lms.conf"
 install -D -m 644 "lms.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/lms.conf"

 cd "$pkgname/build"
 make DESTDIR="$pkgdir" install
 install -D -m 644 "$pkgdir/usr/share/lms/lms.conf" "$pkgdir/etc/lms.conf"
 sed -i "s|/var/lms|/var/lib/lms|g" "$pkgdir/etc/lms.conf"
}