summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d5a69088acf615dd981034b6d7042fc17d1816e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: spider-mario <spidermario@free.fr>
pkgname=zyn-fusion
pkgver=3.0.5
pkgrel=3
pkgdesc="ZynAddSubFX with a new interactive UI"
arch=('i686' 'x86_64')
url="http://zynaddsubfx.sourceforge.net/zyn-fusion.html"
license=('GPL2' 'LGPL2.1')
depends=('fftw' 'libglvnd' 'mxml' 'jack' 'liblo' 'alsa-lib' 'portaudio')
makedepends=('git' 'wget' 'cmake' 'python' 'ruby-rake'
             'glu' # For building pugl, which does not seem to actually need it at runtime
             'python2' # Also for pugl
)
provides=('zynaddsubfx')
conflicts=('zynaddsubfx')
source=("git+https://github.com/zynaddsubfx/zynaddsubfx.git#tag=$pkgver"
        "git+https://github.com/mruby-zest/mruby-zest-build.git#tag=$pkgver"
        'BashCompletion.cmake'
        'gcc10.patch'
        'file-picker.patch')
b2sums=('SKIP'
        'SKIP'
        '14be130e88c2e1d2b8312ca9f6d426834a26360594ed9ed22222a98603e1d5a51e86450911c76563545f55a80952c7dfb05a251e36d59684527caccdf976c474'
        '1f41e7a0a50f1f11a4853bd8d8daea5f4510b567381768a8bc61e15082aa668f924e3d6787cbb93a16eee2da2a34a5d20f18e69399718166d6b9d3f47b648987'
        'd99df6908b1af24d018726b6b737f13cbcd153deb5667e03ea3e138f22c83c237f70921dec58e739486acb3a488965858cb60ab140e00e30f6fb80833af1401d')

prepare() {
	cd zynaddsubfx
	git submodule update --init
	# The original script does not honor DESTDIR. Replace it with a much more straightforward implementation.
	cp "$srcdir"/BashCompletion.cmake cmake/BashCompletion.cmake
	git apply -3 "$srcdir"/file-picker.patch

	cd ../mruby-zest-build
	git submodule update --init
	git apply -3 "$srcdir"/gcc10.patch
	make setup
}

build() {
	mkdir -p build-zynaddsubfx
	cd build-zynaddsubfx
	cmake -DCMAKE_INSTALL_PREFIX=/usr -DGuiModule=zest ../zynaddsubfx
	make

	cd ../mruby-zest-build
	make builddep
	make
	make pack
}

package() {
	install -Dm644 zynaddsubfx/COPYING "$pkgdir"/usr/share/licenses/zynaddsubfx/COPYING
	cd build-zynaddsubfx
	make DESTDIR="$pkgdir/" install

	cd ../mruby-zest-build

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE

	install -d "$pkgdir"/opt/"$pkgname"
	install -m755 package/zest "$pkgdir"/opt/"$pkgname"/zyn-fusion
	cp -a package/{libzest.so,font,schema} "$pkgdir"/opt/"$pkgname"/
	install -d "$pkgdir"/opt/"$pkgname"/qml
	touch "$pkgdir"/opt/"$pkgname"/qml/MainWindow.qml

	ln -s /opt/"$pkgname"/zyn-fusion "$pkgdir"/usr/bin/
}