summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ca2adf86a75d57f99b2b6a6fcb6609c37f4e17b5 (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
# Maintainer: Vadim Kaushan <admin@disasm.info>
# Contributor: Dimitris Kiziridis <ragouel at outlook dot com>

pkgname=lms
pkgver=3.62.1
pkgrel=1
pkgdesc='Lightweight Music Server. Access your self-hosted music using a web interface'
arch=('x86_64')
url='https://github.com/epoupon/lms'
license=('GPL3')
depends=('ffmpeg'
         'libarchive'
         'libconfig'
         'taglib'
         'wt')
makedepends=('cmake'
             'wt'
             'boost'
             'gtest'
             'graphicsmagick')
source=("${pkgname}-${pkgver}.tar.xz::https://github.com/epoupon/lms/archive/v${pkgver}.tar.gz"
        "lms.sysusers"
        "lms.tmpfiles")
sha256sums=('bdf25bdb09bca581074ff9bc533bfdc064a94963a18e4f0248551061bb8cf9c3'
            '9d26489cb828576c8c2296821d52f3a453b2c9d63cdace425e3f312e190601d6'
            '32f537bf3480fbe55d0a9929ba633718fbc16887a68e0ba1a2b3b265c400ed41')
backup=("etc/lms.conf")

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

package() {
  install -d "$pkgdir/var/lib/lms"
  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}-${pkgver}/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"
  install -D -m 644 "$pkgdir/usr/share/lms/default.service" "$pkgdir/usr/lib/systemd/system/lms.service"
}
# vim:set ts=2 sw=2 et: