summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a5215c344d3bab4f9fa3065f77ec00d39a4a0a52 (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
# Maintainer: Teteros <teteros -at- openmailbox -dot- org>

_pkgname=sporth
pkgname=sporth-git
pkgver=r882.7ef5ce7
pkgrel=1
pkgdesc="A small stack-based audio language."
arch=('i686' 'x86_64')
url="http://paulbatchelor.github.io/proj/sporth.html"
license=('MIT')
depends=('jack')
makedepends=('git' 'soundpipe-git')
provides=('sporth')
conflicts=('sporth')
source=("git://github.com/PaulBatchelor/$_pkgname.git")
md5sums=('SKIP')

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

prepare() {
    cd "$_pkgname"

    # Replace hardcoded /usr/local prefixes
    find . -type f -exec sed -i "s|/usr/local|${pkgdir}/usr|g" {} \;

    # Enable JACK support
    # Comment this out and remove jack from depends if you do not need it
    sed -i '/.*BUILD_JACK=1/s/^[@#] //' config.def.mk
}

build() {
    cd "$_pkgname"
    make
}

package() {
    cd "$_pkgname"

    mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/include" "$pkgdir/usr/lib" "$pkgdir/usr/share/doc"
    make install
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    cp -rp examples "$pkgdir/usr/share/doc/$pkgname"
}