summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6048867aef0bc76d5597e3cdd2b7187dd398431f (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
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>

_pkgname=rezonateur
pkgname="${_pkgname}-git"
pkgver=0.1.0.r6.g58ccec5
pkgrel=1
pkgdesc="A virtual-analog 3-band resonator audio effect LV2 and VST2 plugin and JACK client (git version)"
arch=('i686' 'x86_64')
url="https://github.com/jpcima/rezonateur"
license=('Boost')
depends=('cairo')
makedepends=('git' 'mesa')
optdepends=('jack: support for stand-alone JACK client programs')
groups=('pro-audio' 'lv2-plugins' 'vst-plugins')
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/jpcima/${_pkgname}.git"
        'dpf::git+https://github.com/DISTRHO/DPF.git')
md5sums=('SKIP'
         'SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"

  # See https://github.com/jpcima/string-machine/issues/3#issuecomment-512590428
  git describe --long --exclude latest | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${srcdir}/${_pkgname}"

  git submodule init
  git config submodule.dpf.url "${srcdir}/dpf"
  git submodule update

  cd dpf
  patch -N -r - -p 1 -i ../resources/patch/DPF-bypass.patch || :
}

build() {
  cd "${srcdir}/${_pkgname}"

  make
}

package() {
  cd "${srcdir}/${_pkgname}"

  # Create installation directories
  install -dm755 "${pkgdir}"/usr/bin
  install -dm755 "${pkgdir}"/usr/lib/vst
  install -dm755 "${pkgdir}"/usr/lib/lv2/${_pkgname}{-stereo,}.lv2
  # LV2 bundles
  install -Dm644 bin/${_pkgname}.lv2/*.ttl -t \
    "${pkgdir}"/usr/lib/lv2/${_pkgname}.lv2
  install -Dm755 bin/${_pkgname}.lv2/*.so -t \
    "${pkgdir}"/usr/lib/lv2/${_pkgname}.lv2
  install -Dm644 bin/${_pkgname}-stereo.lv2/*.ttl -t \
    "${pkgdir}"/usr/lib/lv2/${_pkgname}-stereo.lv2
  install -Dm755 bin/${_pkgname}-stereo.lv2/*.so -t \
    "${pkgdir}"/usr/lib/lv2/${_pkgname}-stereo.lv2
  # VST shared libraries
  install -m755 bin/${_pkgname}{-stereo,}-vst.so "${pkgdir}"/usr/lib/vst
  # stand-alone JACK client binaries
  install -m755 bin/${_pkgname}{-stereo,} "${pkgdir}"/usr/bin
}