summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2037ae05c271b3af5ef064a1a38a27aeb9db17bc (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
# Author: Jean Pierre Cimalando (jpcima)
# Maintainer: Jean-Michaƫl Celerier <jeanmichael.celerier at gmail dot com>
# Contributor: Chris Arndt <aur -at- chrisarndt -dot- de>

_pkgname=ysfx
pkgname=$_pkgname-git
pkgver=0.0.0.r244.8077347
pkgrel=4
epoch=1
pkgdesc='Hosting library and plugin for JSFX (git version)'
arch=(x86_64)
url='https://github.com/jpcima/ysfx'
license=(Apache)
groups=(pro-audio vst3-plugins)
depends=(gcc-libs glibc)
makedepends=(cmake fontconfig freetype2 git)
optdepends=(
  'vst3-host: for loading the VST3 format plugin'
)
provides=($_pkgname)
conflicts=($_pkgname)
source=(
  "$_pkgname::git+https://github.com/jpcima/$_pkgname.git"
  'dr_libs::git+https://github.com/mackron/dr_libs.git'
)
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $_pkgname
  # no release or tags yet
  local ver=$(grep 'ysfx VERSION' CMakeLists.txt | cut -d '"' -f 2)
  echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

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

build() {
  cmake -S $_pkgname \
        -B $_pkgname-build \
        -Wno-dev \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DYSFX_PLUGIN_COPY=OFF
  cmake --build $_pkgname-build
}

package() {
  depends+=(libfontconfig.so libfreetype.so)
  DESTDIR="$pkgdir" cmake --install $_pkgname-build
  install -vDm 755 \
    $_pkgname-build/ysfx_plugin_artefacts/Release/VST3/ysfx.vst3/Contents/$CARCH-linux/ysfx.so \
    -t "$pkgdir"/usr/lib/vst3/ysfx.vst3/Contents/$CARCH-linux
  install -vDm 644 $_pkgname/README.md -t "$pkgdir"/usr/share/doc/$pkgname
}