summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Arndt2020-05-30 14:54:50 +0200
committerChristopher Arndt2020-05-30 14:54:50 +0200
commit5b30fa4313a200071ab89a7e0e25db16f1ea2229 (patch)
tree04dc49457a5f6e98601289413a2eda45ba9cd693
downloadaur-5b30fa4313a200071ab89a7e0e25db16f1ea2229.tar.gz
New package 'foo-yc20-git'
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD79
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c568d0a3bc68
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = foo-yc20-git
+ pkgdesc = An emulation of the Yamaha YC-20 combo organ as an LV2 plugin and a standalone program (git version)
+ pkgver = 1.3.0.r330.b99d4a3
+ pkgrel = 1
+ url = https://github.com/sampov2/foo-yc20
+ arch = x86_64
+ arch = armv7l
+ groups = pro-audio
+ groups = lv2-plugins
+ license = BSD
+ makedepends = git
+ depends = gtk2
+ depends = jack
+ provides = foo-yc20
+ conflicts = foo-yc20
+ source = foo-yc20::git+https://github.com/sampov2/foo-yc20.git
+ source = faust-0.9.73-mr2.tar.gz::https://github.com/grame-cncm/faust/archive/40a919756d09c6b2de19b3299b7eef55997551dc.tar.gz
+ sha256sums = SKIP
+ sha256sums = 74ad05cd5d508e30d78f31ff230e29793dc1cdb4f156cdb2afe43ac119f82701
+
+pkgname = foo-yc20-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..dd9fc87e8da0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+foo-yc20/
+faust-*.tar.gz
+foo-yc20-git-*.pkg.tar.xz
+foo-yc20-git-*.pkg.tar.zst
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c4801af42dfa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
+
+_name=foo-yc20
+_faust_version=0.9.73-mr2
+_faust_commit=40a919756d09c6b2de19b3299b7eef55997551dc
+pkgname="${_name}-git"
+pkgver=1.3.0.r330.b99d4a3
+pkgrel=1
+pkgdesc="An emulation of the Yamaha YC-20 combo organ as an LV2 plugin and a standalone program (git version)"
+arch=('x86_64' 'armv7l')
+url="https://github.com/sampov2/foo-yc20"
+license=('BSD')
+depends=('gtk2' 'jack')
+groups=('pro-audio' 'lv2-plugins')
+makedepends=('git')
+provides=("${_name}")
+conflicts=("${_name}")
+source=("${_name}::git+https://github.com/sampov2/foo-yc20.git"
+ "faust-${_faust_version}.tar.gz::https://github.com/grame-cncm/faust/archive/${_faust_commit}.tar.gz")
+sha256sums=('SKIP'
+ '74ad05cd5d508e30d78f31ff230e29793dc1cdb4f156cdb2afe43ac119f82701')
+
+
+pkgver() {
+ cd "${srcdir}/${_name}"
+ local ver="$(git tag --sort=-taggerdate | head -n 1)"
+ echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${srcdir}/${_name}"
+ VERSION="$(git tag --sort=-taggerdate | head -n 1)"
+ sed -i -e 's/^VERSION=/VERSION='$VERSION'/' Makefile
+ # Adapted from: https://github.com/zynthian/zynthian-sys/blob/master/scripts/recipes/install_foo-yc20.sh
+ sed -i -e 's|-Iinclude/|-Iinclude -I'${srcdir}'/faust-'${_faust_commit}'/architecture|' Makefile
+ sed -i -e 's/= NULL/= 0/' src/faust-dsp-standalone.cpp
+ sed -i -e 's/= NULL/= 0/' src/faust-dsp-plugin.cpp
+
+ # Fix icon name
+ sed -i -e 's/^Icon=.*/Icon=foo-yc20/' foo-yc20.desktop.in
+
+ # Workaround for wrong include paths in foo-yc20 sources
+ cd "${srcdir}/faust-${_faust_commit}/architecture/faust/audio"
+ ln -sf ../dsp/dsp.h .
+}
+
+build() {
+ cd "${srcdir}/${_name}"
+
+ # Adapted from: https://github.com/zynthian/zynthian-sys/blob/master/scripts/recipes/install_foo-yc20.sh
+ if [[ "$(uname -m)" = "armv7l" ]]; then
+ model="$(cat /proc/device-tree/model)"
+
+ if [[ ${model} =~ "Raspberry Pi 4" ]]; then
+ export CFLAGS="$CFLAGS -O3 -ffast-math -ftree-vectorize -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4"
+ else
+ export CFLAGS="$CFLAGS -O3 -ffast-math -ftree-vectorize -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-fp-armv8"
+ fi
+ else
+ export CFLAGS="$CFLAGS -O3 -ffast-math -ftree-vectorize"
+ fi
+
+ export LDFLAGS_YC20="$LDFLAGS"
+ export LDFLAGS_YC20_CLI="$LDFLAGS"
+ export LDFLAGS_YC20_LV2="$LDFLAGS"
+ make PREFIX="/usr"
+}
+
+package() {
+ cd "${srcdir}/${_name}"
+ make DESTDIR="${pkgdir}/" PREFIX="/usr" install
+ # Fix icon install location
+ install -Dm644 graphics/icon.png "${pkgdir}"/usr/share/pixmaps/foo-yc20.png
+ rm -rf "${pkgdir}/usr/share/foo-yc20"
+ # Install documentation
+ install -Dm644 README -t "${pkgdir}"/usr/share/doc/${pkgname}
+ # Install license
+ install -Dm644 LICENSE* -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}