summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9016bbf18e97bd8f5ba06429167f6da6df16108d (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
69
70
71
72
73
74
75
76
77
78
# Contributor: Adrain Sinclair <adrian at adrusi dot com>
# Contributor: Miroslav Koškár <http://mkoskar.com/>

pkgname='vcvrack'
pkgver=1.0.0
pkgrel=1
pkgdesc='Open-source virtual modular synthesizer'
url='https://vcvrack.com/'
license=(BSD)
arch=(i686 x86_64)
provides=(vcvrack-fundamental)
conflicts=(vcvrack-fundamental)
depends=(curl glew gtk2 jansson libzip openssl rtmidi speexdsp
    libxi libxrandr libxinerama libxcursor libgl
    jack libpulse)
makedepends=(git cmake mesa zip)

source=(
    "$pkgname::git+https://github.com/VCVRack/Rack.git#tag=v$pkgver"
    "fundamental::git+https://github.com/VCVRack/Fundamental.git"
    git+https://github.com/AndrewBelt/osdialog.git
    git+https://github.com/AndrewBelt/oui-blendish.git
    git+https://github.com/glfw/glfw.git
    git+https://github.com/memononen/nanosvg.git
    git+https://github.com/memononen/nanovg.git
    git+https://github.com/thestk/rtaudio.git
    vcvrack.sh
)
sha256sums=(
    SKIP
    SKIP
    SKIP
    SKIP
    SKIP
    SKIP
    SKIP
    SKIP
    ed2da5d924a381cd50125db199578c15bc95c18be716abbd3ff310bbcf6773c0
)

prepare() {
    cd "$srcdir/$pkgname"
    git submodule init
    git config submodule.ext/glfw.url "$srcdir/glfw"
    git config submodule.ext/nanosvg.url "$srcdir/nanosvg"
    git config submodule.ext/nanovg.url "$srcdir/nanovg"
    git config submodule.ext/osdialog.url "$srcdir/osdialog"
    git config submodule.ext/oui-blendish.url "$srcdir/oui-blendish"
    git config submodule.ext/rtaudio.url "$srcdir/rtaudio"
    git submodule update

    cd "$srcdir/$pkgname/plugins"
    git clone "$srcdir/fundamental" "Fundamental"
}

build() {
    cd "$srcdir/$pkgname"
    make dep
    CFLAGS="$CFLAGS $(pkg-config --cflags glew jansson libcurl libzip openssl rtmidi speexdsp)" make RELEASE=1
    
    cd "$srcdir/$pkgname/plugins/Fundamental"
    RACK_DIR="$srcdir/$pkgname" make dep
    RACK_DIR="$srcdir/$pkgname" make dist
}

package() {
    cd "$srcdir/$pkgname"
    install -D -m755 "$srcdir/vcvrack.sh" "$pkgdir/usr/bin/vcvrack"
    install -D -m644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
    install -D -m755 -t "$pkgdir/opt/$pkgname" Rack
    install -D -m755 -t "$pkgdir/opt/$pkgname/lib" dep/lib/lib*
    install -D -m644 -t "$pkgdir/opt/$pkgname" Core.json
    cp -dr --preserve=mode -t "$pkgdir/opt/$pkgname" dep/include
    cp -dr --preserve=mode -t "$pkgdir/opt/$pkgname" res

    cd "$srcdir/$pkgname/plugins/Fundamental"
    install -D -m644 dist/Fundamental-*-lin.zip "$pkgdir/opt/vcvrack/Fundamental.zip"
}