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

_name=solidArp
_pkgname=${_name,,}
pkgname=$_pkgname-git
pkgver=v0.3.0.r0.g7ab516f
pkgrel=1
pkgdesc='A stable random arpeggiator VST3 plugin (git version)'
arch=(x86_64 aarch64)
url='https://github.com/SolidFuel/Arp'
license=(GPL3)
depends=(gcc-libs glibc)
makedepends=(cmake freetype2 git)
groups=(pro-audio vst3-plugins)
provides=($_pkgname starp starp-git)
conflicts=($_pkgname starp starp-git)
optdepends=('vst3-host: for loading the VST3 format plugin')
source=("$_name::git+https://github.com/SolidFuel/Arp.git"
        'git+https://github.com/SolidFuel/CommonComponents.git')
sha256sums=('SKIP'
            'SKIP')

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

prepare() {
  cd $_name
  git submodule init
  git submodule set-url common "$srcdir"/CommonComponents
  git -c protocol.file.allow=always submodule update
}

build() {
  cmake -B $_pkgname-build -S $_name
  cmake --build $_pkgname-build
}

package() {
  depends+=(libfreetype.so)
  install -vDm 644 \
    $_pkgname-build/Source/${_name}_artefacts/Release/VST3/$_name.vst3/Contents/Resources/moduleinfo.json \
    -t "$pkgdir"/usr/lib/vst3/$_name.vst3/Contents/Resources
  install -vDm 755 \
    $_pkgname-build/Source/${_name}_artefacts/Release/VST3/$_name.vst3/Contents/$CARCH-linux/$_name.so \
    -t "$pkgdir"/usr/lib/vst3/$_name.vst3/Contents/$CARCH-linux
  install -vDm 644 $_name/README.md -t "$pkgdir"/usr/share/doc/$pkgname
  install -vDm 644 $_name/docs/* -t "$pkgdir"/usr/share/doc/$pkgname/docs
}