summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 97c1877826362e97a8d445aab61d5d0d2ab7f68e (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
# Maintainer: Alexandros Theodotou <alex at zrythm dot org>

pkgname=os-251
pkgver=1.0.1
pkgrel=1
pkgdesc="Pure digital lo-fi synthesizer plugin"
arch=('x86_64')
groups=('vst3-plugins' 'pro-audio')
url="https://onsenaudio.com/products/os251"
license=('GPL3')
depends=()
makedepends=('git' 'cmake' 'npm' 'git')
provides=("$pkgname")
source=("$pkgname::git+https://github.com/utokusa/OS-251#tag=v$pkgver")
md5sums=('SKIP')

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

  git submodule update --init --recursive
}

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

  # Build the UI (Node.js and react-juce)
  pushd src/jsui
  npm ci
  npm run build
  popd

  rm -rf build
  mkdir -p build
  cd build
  cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" ..
  make PREFIX="/usr"
}

package() {
  cd "${srcdir}/${pkgname}/build"

  pwd
  install -vDm 755 src/Os251_artefacts/Standalone/OS-251 -t "${pkgdir}/usr/bin/"
  install -dvDm 644 src/Os251_artefacts/VST3/OS-251.vst3 "${pkgdir}/usr/lib/vst3/"
}