summaryrefslogtreecommitdiff
path: root/community/jack2/PKGBUILD
blob: 31d0a03e35af5b32b451db32ed3d03f2dc9ed8eb (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# $Id: PKGBUILD 43953 2011-04-01 08:09:21Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Daniele Paolella <danielepaolella@email.it>
# Contributor: Philipp Überbacher <hollunder at gmx dot at>
# Contributor: Thomas Bahn <thomas-bahn at gmx dot net>

pkgbase=jack2
pkgname=('jack2' 'jack2-dbus')
_tarname=jack
pkgver=1.9.7
pkgrel=1
pkgdesc="The next-generation JACK with SMP support"
arch=('i686' 'x86_64')
url="http://jackaudio.org/"
license=('GPL')
depends=('libsamplerate')
makedepends=('python2' 'doxygen' 'libffado' 'celt-0.7' 'dbus-core')
optdepends=('libffado: FireWire support'
            'celt-0.7: NetJACK2 driver'
            'python2: jack_control')
provides=('jack=0.118.0' 'jack-audio-connection-kit=0.118.0' 'jackdbus'
          'jack-audio-connection-kit-mp' 'jackmp' 'jackdmp')
conflicts=('jack')
source=(http://www.grame.fr/~letz/$_tarname-$pkgver.tar.bz2)
md5sums=('9759670feecbd43eeccf1c0f743ec199')

_pyfix() {
  sed -i 's:bin/env python:bin/env python2:' \
    "$pkgdir/usr/bin/jack_control"
}

build() {
  cd "$srcdir"

  # fix doxygen building
  sed -i 's:build/default/html:html:' $_tarname-$pkgver/wscript

  # we're going to do 2 different builds
  cp -r $_tarname-$pkgver $_tarname-dbus-$pkgver

  # mixed dbus/classic build
  cd $_tarname-$pkgver
  msg2 "Running Mixed D-Bus/Classic build"

  python2 waf configure --prefix=/usr \
                        --alsa \
                        --dbus \
                        --classic \
                        --firewire \
                        --doxygen

  python2 waf build $MAKEFLAGS

  # dbus-ONLY build
  cd ../$_tarname-dbus-$pkgver
  msg2 "Running D-Bus-only build"

  python2 waf configure --prefix=/usr \
                        --alsa \
                        --dbus \
                        --firewire \
                        --doxygen

  python2 waf build $MAKEFLAGS
}

package_jack2() {
  optdepends=('libffado: FireWire support'
              'celt-0.7: NetJACK2 driver'
              'dbus-core: jackdbus'
              'python2: jack_control')

  cd "$srcdir/$_tarname-$pkgver"

  python2 waf install --destdir="$pkgdir/"

  # fix for major python transition
  _pyfix
}

package_jack2-dbus() {
  pkgdesc+=" (for D-Bus interaction only)"
  depends+=('dbus-core')
  conflicts+=('jack2')

  cd "$srcdir/$_tarname-dbus-$pkgver"

  python2 waf install --destdir="$pkgdir/"

  _pyfix
}

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