summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b2d5bb17982d8508362c414c492a9474d16dc5f (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
# Maintainer: osch <oliver@luced.de>
pkgname=surge-synthesizer
pkgver=1.6.1.1
scmver=1.6.1.1
pkgrel=1
pkgdesc="Surge Synthesizer plugin"
arch=('x86_64')
url="https://surge-synthesizer.github.io"
license=('GPL3')
groups=('vst-plugins')
depends=('cairo'  'fontconfig'          'freetype2'
         'libx11' 'xcb-util-cursor'     'xcb-util'
         'libxcb' 'xcb-util-renderutil' 'xcb-util-image'
         'xdg-utils'
         )
makedepends=('steinberg-vst36' 'premake-git' 'git')
provides=("surge-synthesizer")
conflicts=('surge-synthesizer')
options=()

prepare() {
	export VST2SDK_DIR="$srcdir/vst2sdk"

	cd "$srcdir"
	rm -rf vst2sdk
	mkdir  vst2sdk
	cd vst2sdk
	# Workaround for steinberg-vst36.git:
	ln -s /usr/include/vst36/pluginterfaces .
	mkdir -p public.sdk/source/
	cd public.sdk/source/
	ln -s /usr/include/vst36 vst2.x

	cd "$srcdir"
	if [ -d surge ]; then
	  cd surge
	  git pull
	else
	  git clone https://github.com/surge-synthesizer/surge.git
	  cd surge
	fi
	git checkout release/$scmver
	git submodule update --init --recursive
	
	sed -i -e 's:dest_path="/:dest_path="$DEST_DIR/:' build-linux.sh
	sed -i -e 's:data_path="/:data_path="$DEST_DIR/:' build-linux.sh
	echo "$scmver" > VERSION
}

build() {
	export VST2SDK_DIR="$srcdir/vst2sdk"
	cd "$srcdir/surge"
	export MAKEFLAGS="-j1" # workaround for broken build script
	./build-linux.sh -p vst2 build
}

package() {
	export VST2SDK_DIR="$srcdir/vst2sdk"
	cd "$srcdir/surge"
	export DEST_DIR="$pkgdir"
	mkdir -p   "$DEST_DIR/usr/share"
	mkdir -p   "$DEST_DIR/usr/lib/vst"
	export MAKEFLAGS="-j1" # just to be sure (s.a.)
	./build-linux.sh -p vst2 install
	mkdir -p   "$DEST_DIR/usr/share/Surge/doc"
	cp LICENSE "$DEST_DIR/usr/share/Surge/doc"
}