summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83e11a29c382140e528ee5ebaaa7c0b9b9b95e12 (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
# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
# Contributor: rtfreedman  (rob<d0t>til<d0t>freedman<aT>googlemail<d0t>com
# Contributor: Loren Copeland <thisisquitealongname at gm--l>

_pkgname=jack2
pkgname=jack2-git
pkgdesc="C++ version of the JACK low-latency audio server for multi-processor machines"
pkgver=1.9.16.r0.g5b78c2ef
pkgrel=1
epoch=1
arch=('x86_64')
url="http://jackaudio.org/"
license=('GPL2' 'LGPL2.1')
groups=('pro-audio')
depends=('db' 'expat' 'opus')
makedepends=('alsa-lib' 'celt' 'dbus' 'git' 'libffado' 'libsamplerate'
             'libsndfile' 'readline' 'systemd-libs' 'waf')
optdepends=('a2jmidid: Expose legacy ALSA sequencer applications in JACK MIDI'
            'libffado: Firewire support'
            'portaudio: Portaudio support'
            'python-dbus: For jack_control'
            'realtime-privileges: Acquire realtime privileges'
            'zita-ajbridge: for using multiple ALSA devices')
provides=('jack' "jack=${pkgver//.r*}"
          "${_pkgname}" "${_pkgname}=${pkgver//.r*}"
          'libjack.so' 'libjacknet.so' 'libjackserver.so')
conflicts=('jack' "${_pkgname}")
replaces=('jack2-dbus-git')
source=("${pkgname}::git+https://github.com/jackaudio/${_pkgname}#branch=master")
md5sums=('SKIP')

prepare() {
  cd "${pkgname}"
  # copying relevant custom waf scripts and loading them specifically using
  # wscript
  (
    touch __init__.py
    mkdir -vp tools
    cp -v waflib/extras/xcode*.py tools
    rm -rv waflib
    sed -e "s/load('xcode'/load('xcode', tooldir='tools'/g" \
        -e "s/load('xcode6'/load('xcode6', tooldir='tools'/g" \
        -i wscript
  )
}

pkgver() {
  cd "${pkgname}"
  # get commits since last unannotated tag
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g;'
}

build() {
  cd "${pkgname}"
  export PYTHONPATH="${PWD}:${PYTHONPATH}"
  waf configure --prefix=/usr \
                --htmldir="/usr/share/doc/${pkgbase}/" \
                --systemd-unit \
                --classic \
                --dbus
  waf build
}

package() {
  depends+=('libasound.so' 'libcelt0.so' 'libdbus-1.so' 'libreadline.so'
            'libsamplerate.so' 'libsndfile.so' 'libsystemd.so')
  cd "${pkgname}"
  export PYTHONPATH="${PWD}:${PYTHONPATH}"
  waf install --destdir="$pkgdir"
}

# vim:set ts=2 sw=2 et: