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

_pkgname=mda-lv2
pkgname=$_pkgname-git
pkgver=1.2.10.r262.5101d1a
pkgrel=1
pkgdesc='A port of the MDA VST plugins to the LV2 format (git version)'
arch=(x86_64)
url='http://drobilla.net/software/mda-lv2.html'
license=(0BSD GPL-2.0-or-later MIT)
groups=(lv2-plugins pro-audio)
depends=(gcc-libs glibc)
makedepends=(git lv2 meson python)
provides=($_pkgname "${_pkgname//-/.}")
conflicts=($_pkgname $_pkgname-svn "${_pkgname//-/.}")
source=("$_pkgname::git+https://gitlab.com/drobilla/mda-lv2.git")
md5sums=('SKIP')

pkgver() {
  cd $_pkgname
  local ver=$(grep -E "^\s+version: '[0-9]+\.[0-9]+\.[0-9]+'" meson.build | cut -d "'" -f 2)
  echo $ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  arch-meson -D tests=disabled $_pkgname $_pkgname-build
  meson compile -C $_pkgname-build
}

check() {
  local _plugins _plugin
  _plugins=(Ambience Bandisto BeatBox Combo DX10 DeEss Degrade Delay Detune
  Dither DubDelay Dynamics EPiano Image JX10 Leslie Limiter Loudness MultiBand
  Overdrive Piano RePsycho RezFilter RingMod RoundPan Shepard Splitter Stereo
  SubSynth TalkBox TestTone ThruZero Tracker Transient VocInput Vocoder)

  for _plugin in "${_plugins[@]}"; do
    # NOTE: whitelist globally visible library: https://gitlab.com/drobilla/mda-lv2/-/issues/2
    lv2lint -Mpack -s lvz_new_audioeffectx -I "$_pkgname-build/mda.lv2" \
      "http://drobilla.net/plugins/mda/$_plugin"
  done

  # upstream tests require 'autoship', which is not packaged nor vendored in the project
  #meson test -C $_pkgname-build
}



package() {
  meson install -C $_pkgname-build --destdir "$pkgdir"
  install -vDm 644 $_pkgname/{NEWS,README.md} -t "$pkgdir"/usr/share/doc/$pkgname
  install -vDm 644 $_pkgname/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
}

# vim:set ts=2 sw=2 et: