summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Algar2021-09-10 10:41:31 -0700
committerRyan Algar2021-09-10 10:41:31 -0700
commit141f9f20b5b431c6fed9c7ea4fd562c546a1c0f6 (patch)
treed70b71b67c99f651c038b2930c8d439815ff6e86
parentc334445de9ef8bc2036af487148afea529dc8148 (diff)
downloadaur-141f9f20b5b431c6fed9c7ea4fd562c546a1c0f6.tar.gz
Changes:
- Bump Odin2 version to 2.3.1 - Migrate user data from /opt/odin2 to ~/.local/share/odin2 - Reference specific tag in Odin2 repository, so as to prevent the compilation from breaking on future version bumps
-rw-r--r--.SRCINFO5
-rw-r--r--.install47
-rw-r--r--PKGBUILD16
3 files changed, 58 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3ce3c4320b1b..e94750e06218 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = odin2-synthesizer
pkgdesc = 24 voice polyphonic synthesizer, with modulation and FX. (Standalone, VST3, LV2)
- pkgver = 2.2.4
- pkgrel = 5
+ pkgver = 2.3.1
+ pkgrel = 1
url = https://www.thewavewarden.com/odin2
+ install = .install
arch = x86_64
license = GPL3
makedepends = atk
diff --git a/.install b/.install
new file mode 100644
index 000000000000..67db3018839f
--- /dev/null
+++ b/.install
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+migrateUserData() {
+ local user
+ local homedir
+
+ # Get information from the user
+ if [[ $SUDO_USER ]] ; then
+ user="$SUDO_USER"
+ elif [[ $DOAS_USER ]] ; then
+ user="$DOAS_USER"
+ else
+ return 1
+ fi
+ homedir=$(getent passwd "$user" | cut -d: -f6) || return 1
+
+ # If needed, create userspace path
+ if [[ ! -d "$homedir/.local/share/odin2/Soundbanks" ]] ; then
+ sudo -u "$user" mkdir -p "$homedir/.local/share/odin2/Soundbanks" || return 1
+ fi
+
+ # Create/Migrate the user data
+ if [[ -d /opt/odin2 ]] ; then
+ sudo -u "$user" cp -r '/opt/odin2/Soundbanks/User Patches' "$homedir/.local/share/odin2/Soundbanks" || return 1
+ rm -rf /opt/odin2 || return 1
+ else
+ if [[ ! -d "$homedir/.local/share/odin2/Soundbanks/User Patches" ]] ; then
+ mkdir "$homedir/.local/share/odin2/Soundbanks/User Patches"
+ fi
+ fi
+}
+
+pre_install() {
+ if migrateUserData ; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+pre_upgrade() {
+ if migrateUserData ; then
+ return 0
+ else
+ return 1
+ fi
+}
diff --git a/PKGBUILD b/PKGBUILD
index d22162ec2ea5..9b3e7f34674a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Upstream: TheWaveWarden (Frederik Siepe) <info AT thewavewarden DOT com>
pkgname=odin2-synthesizer
-pkgver=2.2.4
-pkgrel=5
+pkgver=2.3.1
+pkgrel=1
pkgdesc='24 voice polyphonic synthesizer, with modulation and FX. (Standalone, VST3, LV2)'
license=('GPL3')
arch=('x86_64')
@@ -41,17 +41,18 @@ source=("${srcdir}/${pkgname%-synthesizer}::git+https://github.com/TheWaveWarden
'Makefile.patch')
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
backup=('opt/odin2/odin2.conf' 'opt/odin2/Soundbanks/User Patches')
+install='.install'
prepare() {
- # Checkout the 6.0.1 branch of JUCE, and build Projucer
+ # Checkout the correct branch of JUCE, and build Projucer
cd "${srcdir}/JUCE"
- git checkout -q a30f7357863a7d480a771e069abf56909cdf0e13
+ git checkout -q b13af2df9530bf473ff9a85936e5700027bd2af4
cd extras/Projucer/Builds/LinuxMakefile
make -j"$(nproc)" CONFIG=Release
# Export Odin 2 build files with Projucer
git checkout lv2
- git checkout -q c51d03f11be20cb35eb28e8016e9a81827b50339
+ git checkout -q f00a420bc348d79c4688b33b2b905b8ca0f25a3a
export GDK_BACKEND=x11
build/Projucer --set-global-search-path linux defaultJuceModulePath "${srcdir}/JUCE/modules"
build/Projucer --resave "${srcdir}/${pkgname%-synthesizer}/Odin.jucer"
@@ -67,6 +68,8 @@ pkgver() {
build() {
cd "${srcdir}/odin2/Builds/LinuxMakefile"
+ git checkout v2.3.1
+ git submodule update --init --recursive
make clean
make CONFIG=Release -j"$(nproc)"
}
@@ -85,7 +88,4 @@ package() {
install -Dm 644 "${srcdir}/odin2/Builds/LinuxMakefile/build/Odin2_.lv2/manifest.ttl" "${pkgdir}/usr/lib/lv2/Odin2.lv2/manifest.ttl"
install -Dm 755 "${srcdir}/odin2/Builds/LinuxMakefile/build/Odin2" "${pkgdir}/usr/bin/odin2-synthesizer"
-
- mkdir -pm 777 "${pkgdir}/opt/odin2" "${pkgdir}/opt/odin2/Soundbanks/User Patches"
- cp -r "${srcdir}/odin2/Soundbanks/Factory Presets" "${pkgdir}/opt/odin2/Soundbanks/Factory Presets"
}