summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 90d4f30df699d6ad4ac0511accdb2025c83fcf78 (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
# Maintainer: Mads Kjeldgaard<mail@madskjeldgaard.dk>
pkgname=supercollider-super-bufrd-git
pkgver=r84.a785981
pkgrel=2
pkgdesc="SuperCollider plugins for accessing long buffers with subsample accuracy"
arch=('any')
url="https://github.com/esluyter/super-bufrd"
license=('GPL')
groups=('pro-audio' 'supercollider-plugins')
depends=('supercollider')
makedepends=("git" "cmake" "supercollider-headers-git")
optdepends=()
source=("$pkgname"::git+$url.git)
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/$pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
		SC_SRC="/usr/share/supercollider-headers"

		cd "$srcdir/$pkgname"

		mkdir build 
		cd build

		cmake -DSC_PATH=$SC_SRC -DCMAKE_BUILD_TYPE=RELEASE ..
		make

}


package() {
	cd "$srcdir/$pkgname"
	DEST="$pkgdir/usr/share/SuperCollider/Extensions/$pkgname"


	# Prepare install directories
	mkdir -p $DEST/Classes 
	mkdir -p $DEST/HelpSource/Classes
	mkdir -p $DEST/SystemOverwrites

	# Classes
	for FILE in "*.sc"; do install -Dm755 ./$FILE "$DEST/Classes"; done
	for FILE in "SystemOverwrites/*.sc"; do install -Dm755 ./$FILE "$DEST/SystemOverwrites"; done

	# Shared objects
	for FILE in *.so; do install -Dm755 ./build/*.so "$DEST"; done

	# Help Files
	for FILE in "HelpSource/Classes/*"; do install -Dm755 ./$FILE "$DEST/HelpSource/Classes"; done

}