desktop/stk/PKGBUILD

51 lines
1.3 KiB
Bash

# Contributions from Arch:
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Mateusz Herych <heniekk@gmail.com>
pkgname=stk
pkgver=4.5.0
pkgrel=1
pkgdesc='The Synthesis ToolKit in C++'
arch=('x86_64')
url='http://ccrma.stanford.edu/software/stk/'
license=('MIT')
depends=('gcc-libs' 'jack')
makedepends=('pkg-config')
optdepends=('tk: run provided demos/samples')
source=("http://ccrma.stanford.edu/software/stk/release/$pkgname-$pkgver.tar.gz"
"$pkgname.license"
runtime.patch)
md5sums=('2fd27e51dd0df92edcf96bd9080db76d'
'a0163d75a5f516b6c93f4fc948acff73'
'36551c348340307c765fde85d4336e73')
build() {
cd "$srcdir/$pkgname-$pkgver"
# add missing linker flag
export LIBS="$LIBS -lpthread"
# enable shared library
sed -i 's/all : $(STATICLIB)/all : $(SHAREDLIB)/' src/Makefile.in
# fix demo rawwaves path
sed -i 's:\.\./\.\.:/usr/lib/stk:' projects/demo/demo.cpp
# run actual build
./configure RAWWAVE_PATH=/usr/lib/stk/rawwaves/ --prefix=/usr --with-alsa --with-jack
make
# fix executable scripts
patch -Np1 -i ../runtime.patch
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="${pkgdir}" install
# install license
install -Dm644 "../$pkgname.license" "$pkgdir/usr/share/licenses/stk/LICENSE"
}