summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorOSAMC2022-11-19 14:35:17 +0000
committerChristopher Arndt2022-11-19 14:35:17 +0000
commiteb1e91d646e34d93c00635f959a39405b68888a4 (patch)
treebc549e617473ffc8c1461ebcb4404166253cf372 /PKGBUILD
parenta840f2a13f49338133d039a87015e8ea60471eea (diff)
downloadaur-eb1e91d646e34d93c00635f959a39405b68888a4.tar.gz
feat: import and update package 'ot-simian' from AUR (#119)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD88
1 files changed, 53 insertions, 35 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 557eb19c3539..411952be93b9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,59 +1,77 @@
-# Maintainer: Alexandros Theodotou <alex at zrythm dot org>
+# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
+# Contributor: Alexandros Theodotou <alex at zrythm dot org>
pkgname=ot-simian
-pkgver=1.0.1
+pkgver=1.1.0
pkgrel=1
pkgdesc='Drum synthesizer inspired by the Simmons SDS-V'
-arch=(x86_64)
+arch=(aarch64 x86_64)
url='https://punklabs.com/ot-simian'
license=(GPL3)
-depends=(glibc gcc-libs libx11)
-makedepends=(faust dub ldc)
+depends=(gcc-libs libx11)
+makedepends=(dub faust ldc python)
optdepends=(
'lv2-host: for LV2 plugin'
'vst3-host: for VST3 plugin'
)
groups=(lv2-plugins pro-audio vst3-plugins)
source=("https://punklabs.com/content/projects/ot-simian/downloads/OneTrick-SIMIAN-${pkgver}-Source.zip"
- 'Dplug::git+https://github.com/AuburnSounds/Dplug.git')
-sha256sums=('9bb042073a38a1c465ed4e7ed2347711c0ab83853abe341f2b8e2f652a17949e'
- 'SKIP')
+ 'generate-manifest-ttl.py')
+sha256sums=('ef84e856a3b9579cfa1b43c840d758d490accd0ef478cfd55318c2a60e897b66'
+ '261c2bfe8c692ce7df4d376b869cb832d5b3a668d3960cfef62f52d2a39d0f6f')
+noextract=("OneTrick-SIMIAN-${pkgver}-Source.zip")
+_plugin_name="Punk Labs LLC OneTrick SIMIAN"
+_lv2_name="$_plugin_name.lv2"
+_lv2_libname="${_plugin_name// /}.so"
+_vst3_libpath="$_plugin_name.vst3/Contents/$(uname -m)-linux"
+_vst3_libname="$_plugin_name.so"
-build() {
- # FIXME: dplug-build should be packaged separately
- cd Dplug/tools/dplug-build
- dub --cache=local --compiler ldc2 #--skip-registry=all
- cd "$srcdir"/plugin
- ln -sf "$srcdir"/Dplug/tools/dplug-build/dplug-build
+prepare() {
+ mkdir -p OneTrick-SIMIAN-${pkgver}
+ bsdtar -xf "$srcdir"/OneTrick-SIMIAN-${pkgver}-Source.zip -C OneTrick-SIMIAN-${pkgver}
- faust --process-name processDrum -lang dlang -A "DSP/arch" \
- -a custom.d.template -o "DSP_Drum.d" --class-name DSP_Drum \
- "DSP/Simian.dsp"
- faust --process-name processOutput -lang dlang -A "DSP/arch" \
- -a custom.d.template -o "DSP_Output.d" --class-name DSP_Output \
- "DSP/Simian.dsp"
+ cd "$srcdir"/OneTrick-SIMIAN-${pkgver}
+ # make dub build use LDFLAGS
+ if ! grep -q -- -Wl dub.json; then
+ sed -i -Ee 's@"lflags-linux-ldc": \[(.*)]@"lflags-linux-ldc": [ \1, "'$LDFLAGS'" ]@' dub.json
+ fi
+}
- # FIXME: second build fails with a bunch of conflicts. Need to investigate.
- rm -rf .dub/build
- # HACK: setting HOME to cause dub to write its cache to cwd
- HOME=$(pwd) ./dplug-build --build release --config LV2 --config VST3
+build() {
+ cd "$srcdir"/OneTrick-SIMIAN-${pkgver}
+ # Generate D sources from FAUST .dsp files
+ faust \
+ --process-name processDrum \
+ -lang dlang \
+ -A "OneTrick/DSP" \
+ -a arch.fastmath.d.template \
+ -o DSP/Generated/DSP_Drum.d \
+ --class-name DSP_Drum "DSP/Main.dsp"
+ faust \
+ --process-name processOutput \
+ -lang dlang \
+ -A "OneTrick/DSP" \
+ -a arch.fastmath.d.template \
+ -o "DSP/Generated/DSP_Output.d" \
+ --class-name DSP_Output "DSP/Main.dsp"
+ # Build LV2 plugin
+ dub build --build=release-nobounds --arch=$CARCH --compiler=ldc2 --combined --config=LV2
+ mkdir -p "$_lv2_name"
+ mv libonetrick_simian.so "$_lv2_name/$_lv2_libname"
+ python "$srcdir"/generate-manifest-ttl.py "$_lv2_name/$_lv2_libname" "$_lv2_name" "$_lv2_libname"
+ # Build VST3 plugin
+ dub build --build=release-nobounds --arch=$CARCH --compiler=ldc2 --combined --config=VST3
+ mv libonetrick_simian.so "$_vst3_libname.so"
}
package() {
- cd plugin
- local plugin_name="Punk Labs LLC OneTrick SIMIAN"
-
+ cd OneTrick-SIMIAN-${pkgver}
# LV2 plugin bundle
- local lv2_name="$plugin_name.lv2"
- install -Dm644 "builds/Linux-64b-LV2/$lv2_name"/*.ttl \
- -t "$pkgdir/usr/lib/lv2/$lv2_name"
- install -Dm755 "builds/Linux-64b-LV2/$lv2_name"/*.so \
- -t "$pkgdir/usr/lib/lv2/$lv2_name"
+ install -Dm644 "$_lv2_name"/*.ttl -t "$pkgdir/usr/lib/lv2/$_lv2_name"
+ install -Dm755 "$_lv2_name"/*.so -t "$pkgdir/usr/lib/lv2/$_lv2_name"
# VST3 plugin bundle
- local vst3_dir="$plugin_name.vst3/Contents/$(uname -m)-linux"
- install -Dm755 "builds/Linux-64b-VST3/$vst3_dir/$plugin_name.so" \
- -t "$pkgdir/usr/lib/vst3/$vst3_dir"
+ install -Dm755 "$_vst3_libname.so" -t "$pkgdir/usr/lib/vst3/$_vst3_libpath"
}