upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / stochas / trunk / PKGBUILD
blob8bfa4c93ba7b922282925647ed4a9092e6d7520d
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=Stochas
4 pkgname=stochas
5 pkgver=1.3.5
6 pkgrel=2
7 pkgdesc="A probabilistic polyrhythmic sequencer"
8 arch=('x86_64')
9 url="https://surge-synth-team.org/stochas"
10 license=('GPL3')
11 groups=(pro-audio vst3-plugins)
12 depends=(gcc-libs glibc hicolor-icon-theme libpng zlib)
13 makedepends=(alsa-lib cmake flac freetype2 gendesk jack libogg libvorbis libx11 libxcursor libxinerama libxrandr juce)
14 checkdepends=()
15 optdepends=(
16   'jack: to use standalone with JACK'
17   'vst3-host: for VST3 plugin'
19 source=(
20   "${pkgname}-${pkgver}.tar.gz::https://github.com/surge-synthesizer/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
21   "${pkgname}-1.3.4-devendor_juce.patch"
23 sha512sums=('5e30b51006c6f87652cd48cc45ec58993c7e44dff3890a834c9c80db0e20ce43e40f4dc4587c0c65ba905f5cfd3c91acb1dd96bdf3a3644cedc6e1fe78883656'
24             '32da969ddd4693c4b753269cc4169487dd7bcf42551f1e20ee8a9d9d23d24f850ffde2f7228863ad0a92e461680e885ee71444f8ba5c440b3dbc242a792b435c')
25 b2sums=('cae43e17ff88ddd23a2f7ec29f981c74809a1043bc0fdf0c6611dcbaa62397c4c43317643077ee66fd0890dc1227c561711391e792f004e6f037803f44fdb5a3'
26         'f57cc2bd496c49f8cc55429031330ebc54fe202d18d4b719070b1f550dbb5f5ffb01fe9e7148a898b3b62acfcc1410fbdc6c56de103364c4d91f0660cf5a2fdb')
28 prepare() {
29   cd "$pkgname-$pkgver"
30   patch -Np1 -i ../"${pkgname}-1.3.4-devendor_juce.patch"
32   gendesk -n \
33           --pkgname "org.surge-synth-team.${_name}" \
34           --pkgdesc "${pkgdesc}" \
35           --exec "${_name}" \
36           --name "${_name}" \
37           --icon "org.surge-synth-team.${_name}" \
38           --genericname "Audio Sequencer" \
39           --categories "AudioVideo;Audio"
42 build() {
43   cd "$pkgname-$pkgver"
44   export CFLAGS+=" -DNDEBUG"
45   export CXXFLAGS+=" -DNDEBUG"
46   cmake -DCMAKE_INSTALL_PREFIX=/usr \
47         -DCMAKE_BUILD_TYPE='None' \
48         -DBoost_NO_BOOST_CMAKE=ON \
49         -Wno-dev \
50         -B build \
51         -S .
52   make VERBOSE=1 -C build
55 package() {
56   depends+=(libFLAC.so libasound.so libfreetype.so libjpeg.so libogg.so libvorbis.so libvorbisenc.so libvorbisfile.so)
58   cd "$pkgname-$pkgver"
59   # project has no install target :(
60   install -vDm 755 build/${pkgname}_artefacts/None/Standalone/${_name} -t "${pkgdir}/usr/bin/"
61   install -vDm 755 build/${pkgname}_artefacts/None/VST3/${_name}.vst3/Contents/${CARCH}-linux/${_name}.so \
62     -t "${pkgdir}/usr/lib/vst3/Stochas.vst3/Contents/${CARCH}-linux/"
64   install -vDm 644 *.desktop -t "${pkgdir}/usr/share/applications/"
65   install -vDm 644 image/app_logo_512.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/org.surge-synth-team.${_name}.png"