summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD189
1 files changed, 103 insertions, 86 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0d34c3bf371c..414b1403721a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,115 +1,132 @@
# Maintainer: Phil A. <flying-sheep@web.de>
+# Maintainer: Florian Hülsmann <fh@cbix.de>
# Contributor: David Runge <dave@sleepmap.de>
# Contributor: Adrain Sinclair <adrian at adrusi dot com>
# Contributor: Miroslav Koškár <http://mkoskar.com/>
-# Contributor: Florian Hülsmann <fh@cbix.de>
_name=Rack
pkgname=vcvrack
pkgver=2.1.0
-pkgrel=1
+pkgrel=2
pkgdesc='Open-source Eurorack modular synthesizer simulator'
url='https://vcvrack.com/'
license=(custom CCPL GPL3)
arch=(x86_64)
-depends=(
- curl
- glew
- glfw
- jack
- jansson
- libpulse
- openssl
- rtaudio
- rtmidi
- speexdsp
- zenity
- zstd
-)
-makedepends=(git wget cmake unzip gendesk)
-_submodule_deps=(nanovg nanosvg osdialog oui-blendish fuzzysearchdatabase filesystem pffft)
+_plugin_name=Fundamental
+_plugin_ver=$pkgver
+_plugin_pkg=${pkgname}-${_plugin_name,,}
+makedepends=(curl glew glfw-x11 jansson libarchive openssl rtaudio rtmidi speexdsp zstd gendesk jq)
+provides=(libRack.so $_plugin_pkg)
+conflicts=($_plugin_pkg)
+groups=(pro-audio)
+# use submodule_commits.sh to update this
+_submodules=(filesystem fuzzysearchdatabase nanosvg nanovg osdialog oui-blendish pffft)
+_commits=(7e37433 fe62479 25241c5 0bebdb3 21b9dcc 2fc6405 74d7261)
source=(
- "$pkgname-$pkgver::git+https://github.com/$pkgname/$_name.git#tag=v$pkgver"
- 'git+https://github.com/VCVRack/nanovg.git'
- 'git+https://github.com/memononen/nanosvg.git'
- 'git+https://github.com/AndrewBelt/osdialog.git'
- 'git+https://github.com/VCVRack/oui-blendish.git'
- 'git+https://bitbucket.org/j_norberg/fuzzysearchdatabase.git'
- 'git+https://github.com/gulrak/filesystem.git'
- 'git+https://bitbucket.org/jpommier/pffft.git'
- "$pkgname.sh"
-)
-sha512sums=(
- SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP
- '8ca3fbc790fa5d311ce41b5b9e84a79fe51db73cbf0f56f04d0429b28f0c4c0646e2d0c081b584161356ec24b06cc0181b115b865d564ff1452c64a57135acf6'
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/VCVRack/${_name}/archive/v${pkgver}.tar.gz"
+ 'https://github.com/VCVRack/Rack/commit/ac73ef4.patch'
+ "filesystem-${_commits[0]}.tar.gz::https://github.com/gulrak/filesystem/archive/${_commits[0]}.tar.gz"
+ "fuzzysearchdatabase-${_commits[1]}.tar.gz::https://bitbucket.org/j_norberg/fuzzysearchdatabase/get/${_commits[1]}.tar.gz"
+ "nanosvg-${_commits[2]}.tar.gz::https://github.com/memononen/nanosvg/archive/${_commits[2]}.tar.gz"
+ "nanovg-${_commits[3]}.tar.gz::https://github.com/VCVRack/nanovg/archive/${_commits[3]}.tar.gz"
+ "osdialog-${_commits[4]}.tar.gz::https://github.com/AndrewBelt/osdialog/archive/${_commits[4]}.tar.gz"
+ "oui-blendish-${_commits[5]}.tar.gz::https://github.com/VCVRack/oui-blendish/archive/${_commits[5]}.tar.gz"
+ "pffft-${_commits[6]}.tar.gz::https://bitbucket.org/jpommier/pffft/get/${_commits[6]}.tar.gz"
+ "${_plugin_pkg}-${_plugin_ver}.tar.gz::https://github.com/VCVRack/${_plugin_name}/archive/v${_plugin_ver}.tar.gz"
+ 'plugins.patch'
+ 'vcvrack.sh'
+ 'profile.sh'
)
+sha256sums=('c3a30105d673733698fca934a4287728c1eb49d76204f76d6e8152b4cc940594'
+ 'ad431dfed9655e5af202403ef9e61d4b68d0861b2fe5de5a724242cac0a3eef5'
+ '15e1dacd2a52d7cf67afcc548cc92b218f88a2726488e50887922e86c1493f68'
+ '31cb6aa73ab52347ea56f7eb47947bad154cee588a0780df18e9523975bfb971'
+ 'd957259360bf108858388bb01686a8cb0fc31d90db2d996ddf65575b37bb20d4'
+ '043d67b2fd81d52b80c5db366292a8d1910a70abdf0b3cc7750bd8705cf5fb96'
+ 'da6c2b5cd661dd1875af867e02bac4dee4e2db7ea6ed3e8a7fd840223d7ce642'
+ 'f5c5a814b3302ac865ab648ec69f586b67cc0e9d2e51f77bcd4f495e75af6930'
+ 'ca077ad436bcb5ffe579ee886b8e61c87e2ebd81fc762be02a9ca07235e219ff'
+ 'a81220cd78a29b7897597860f6d9d4af21fc28a15873e14dff66eb7b0ca17f17'
+ 'b5b33ecb74123bd24029a7936d48d93c8be441dac8258c81f07c780a2efa692f'
+ '21ac35c6ad4e5a29c32939b17baaf7ac1936077eda2214e28675eefcf2021db8'
+ 'e1da6ccf04bae3a2101151fec7ddd32e48ff92b0a1146b559fd3221c778d521f')
+# extract the submodules ourselves so we have control over the unpacked top-level directory name
+noextract=($(for _i in ${!_submodules[@]}; do \
+ echo "${_submodules[$_i]}-${_commits[$_i]}.tar.gz"; done))
prepare() {
- cd "$pkgname-$pkgver"
- for M in "${_submodule_deps[@]}"; do
- git submodule init "dep/$M"
- git config "submodule.dep/$M.url" "$srcdir/$M"
- git submodule update "dep/$M"
- done
+ cd "${_name}-$pkgver"
+ echo noextract ${noextract[@]}
+ # extract submodules
+ for _i in ${!_submodules[@]}; do
+ bsdtar -xf ../${_submodules[$_i]}-${_commits[$_i]}.tar.gz -C dep/${_submodules[$_i]} --strip-components 1
+ done
+
+ # add target to only build included dependencies
+ echo 'includes: $(nanovg) $(nanosvg) $(osdialog) $(oui-blendish) $(fuzzysearchdatabase) $(ghcfilesystem) $(pffft)' >> dep/Makefile
- # fix plugin.mk’s use of jq, if SLUG/VERSION are unset
- sed -e 's/SLUG :=/SLUG ?=/' \
- -e 's/VERSION :=/VERSION ?=/' \
- -i plugin.mk
-
- # add target to only build included dependencies
- echo 'includes: $(nanovg) $(nanosvg) $(osdialog) $(oui-blendish) $(fuzzysearchdatabase) $(ghcfilesystem) $(pffft)' >> dep/Makefile
+ # revert recent changes to rtaudio.cpp that require an unreleased version of rtaudio
+ patch -Rp1 -r - -i ../ac73ef4.patch || true
- # recent changes to rtaudio.cpp require an unrelease version of rtaudio
- git checkout 6ae7fe05216950e461a27e05e8b9de53ccf8247b src/rtaudio.cpp
+ # support building plugins and loading system-wide plugins
+ patch -p1 -i ../plugins.patch
- gendesk -f -n \
- --pkgname "$pkgname" \
- --name "VCV $_name" \
- --exec "$_name" \
- --pkgdesc "$pkgdesc" \
- --genericname "Virtual modular synthesizer" \
- --categories "AudioVideo;Audio"
+ gendesk -f -n \
+ --pkgname $pkgname \
+ --name "VCV Rack" \
+ --exec Rack \
+ --pkgdesc "$pkgdesc" \
+ --genericname "Virtual modular synthesizer" \
+ --categories "AudioVideo;Audio"
}
build() {
- cd "$pkgname-$pkgver"
- VERSION=$pkgver make -C dep includes
- VERSION=$pkgver make LDFLAGS+="-shared \
- -lGLEW -lglfw -ljansson \
- -lcurl -lssl -lcrypto \
- -larchive -lzstd -lspeexdsp \
- -lsamplerate -lrtmidi -lrtaudio \
- -lpthread -lGL -ldl \
- -lasound -ljack \
- -lpulse -lpulse-simple"
+ cd "${_name}-$pkgver"
+ _ldflags="-shared -ldl \
+ $(pkg-config --libs glew \
+ glfw3 jansson libcurl openssl \
+ libarchive libzstd speexdsp \
+ samplerate rtmidi rtaudio)"
+ VERSION=$pkgver make -C dep includes
+ VERSION=$pkgver make LDFLAGS+="$_ldflags" STANDALONE_LDFLAGS="$LDFLAGS"
+ cd ../${_plugin_name}-$_plugin_ver
+ VERSION=$_plugin_ver RACK_DIR=../${_name}-$pkgver make dist
}
package() {
- cd "$pkgname-$pkgver"
- install -vDm 755 "$_name" -t "$pkgdir/opt/$pkgname"
- install -vDm 755 "lib$_name.so" -t "$pkgdir/opt/$pkgname"
- install -vDm 755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$_name"
- install -vDm 644 -t "$pkgdir/opt/$pkgname" template.vcv
- install -vDm 644 -t "$pkgdir/opt/$pkgname" Core.json
- install -vDm 644 -t "$pkgdir/opt/$pkgname" cacert.pem
+ # Rack does not start with glfw-wayland
+ depends=(libcurl.so libGLEW.so glfw-x11 jansson libarchive.so \
+ openssl librtaudio.so librtmidi.so libsamplerate.so speexdsp zenity)
+ cd "${_name}-$pkgver"
+ install -vDm755 Rack -t "$pkgdir"/usr/lib/${pkgname}
+ install -vDm755 libRack.so -t "$pkgdir"/usr/lib
+ install -vDm755 "$srcdir"/vcvrack.sh "$pkgdir"/usr/bin/Rack
+ install -vDm644 template.vcv Core.json cacert.pem -t "$pkgdir"/usr/lib/$pkgname
+
+ # resources
+ cp -dr --preserve=mode res -t "$pkgdir"/usr/lib/$pkgname
+
+ # headers (required for plugins)
+ for _path in {app,dsp,engine,plugin,simd,ui,widget,window}; do
+ install -vDm644 include/${_path}/* \
+ -t "$pkgdir"/usr/include/${pkgname}/${_path}/
+ done
+ install -vDm644 include/*.{h,hpp} -t "$pkgdir"/usr/include/${pkgname}/
+ install -vDm644 dep/include/*.h -t "$pkgdir"/usr/include/${pkgname}/dep
+ # Makefile snippets required for plugins
+ install -vDm644 {arch,compile,dep,plugin}.mk -t "$pkgdir"/usr/share/$pkgname
- # resources
- cp -dr --preserve=mode res -t "$pkgdir/opt/$pkgname"
+ # xdg desktop integration
+ install -vDm644 ${pkgname}.desktop -t "$pkgdir"/usr/share/applications/
+ install -vDm644 res/icon.png "$pkgdir"/usr/share/pixmaps/${pkgname}.png
+ # licenses
+ install -vDm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
- # headers (required for plugins)
- for _path in {app,dsp,engine,plugin,simd,ui,widget,window}; do
- install -vDm 644 "include/$_path/"* \
- -t "$pkgdir/usr/include/$pkgname/$_path/"
- done
- install -vDm 644 include/*.{h,hpp} -t "$pkgdir/usr/include/$pkgname/"
- install -vDm 644 dep/include/*.h -t "$pkgdir/usr/include/$pkgname/dep"
- # Makefile snippets required for plugins
- install -vDm 644 {arch,compile,dep,plugin}.mk -t "$pkgdir/usr/share/$pkgname"
+ # Fundamental plugin
+ cd ../${_plugin_name}-$_plugin_ver
+ install -d "$pkgdir"/usr/lib/${pkgname}/plugins
+ cp -a dist/$_plugin_name -t "$pkgdir"/usr/lib/${pkgname}/plugins/
- # xdg desktop integration
- install -vDm 644 "$pkgname.desktop" -t "$pkgdir/usr/share/applications/"
- install -vDm 644 'res/icon.png' "$pkgdir/usr/share/pixmaps/$pkgname.png"
- # licenses
- install -vDm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname"
+ # RACK_DIR environment variable
+ install -vDm644 "$srcdir"/profile.sh "$pkgdir"/etc/profile.d/vcvrack.sh
}