summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d8f2f16e57c3af8e1c0c0386e13b8536931f90ca (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
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>

_pkgname=mephisto.lv2
pkgname="$_pkgname-git"
pkgver=0.18.2.r100.gc33b96b
pkgrel=1
pkgdesc='A Just-in-Time FAUST compiler embedded in an LV2 plugin (git version)'
arch=(x86_64)
url="https://git.open-music-kontrollers.ch/~hp/mephisto.lv2"
license=(Artistic2.0)
groups=(lv2-plugins pro-audio)
depends=(fontconfig glib2 glibc libglvnd libvterm libx11 ttf-fira-code ttf-fira-sans)
makedepends=(faust fontconfig git glew glu lv2 meson)
checkdepends=(lv2lint reuse)
optdepends=(
  'lv2-host: for LV2 plugins'
)
provides=($_pkgname)
conflicts=($_pkgname)
source=("$_pkgname::git+https://git.open-music-kontrollers.ch/~hp/$_pkgname")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  test -d $_pkgname-build && extra_args="--reconfigure"
  arch-meson $extra_args $_pkgname-build $_pkgname
  meson compile -C $_pkgname-build
}

check() {
  meson test -C $_pkgname-build --print-errorlogs
}

package() {
  depends+=(libGL.so libfaust.so libfontconfig.so)
  meson install -C $_pkgname-build --destdir="$pkgdir"
  rm -vf "$pkgdir"/usr/lib/lv2/$pkgname/*.ttf
  for font_type in Bold Light Medium Regular; do
    ln -svf /usr/share/fonts/TTF/FiraCode-$font_type.ttf "$pkgdir"/usr/lib/lv2/$_pkgname
  done
  install -vDm 644 $_pkgname/{ChangeLog,README.md} -t "$pkgdir"/usr/share/doc/$pkgname
}