summaryrefslogtreecommitdiff
path: root/community/jack2/PKGBUILD
blob: 45e9753e2b98bb60b38640d9f87085b11abce5ae (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
94
95
96
97
98
99
100
# $Id: PKGBUILD 52694 2011-07-27 17:23:48Z 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=2
arch=('i686' 'x86_64' 'mips64el')
url="http://jackaudio.org/"
license=('GPL')
makedepends=('python2' 'doxygen' 'libffado' 'celt'
             'libsamplerate' 'dbus-core')
[ "$CARCH" = "mips64el" ] && \
makedepends=('python2' 'doxygen' 'celt'
             'libsamplerate' 'dbus-core')
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"
}

_wafconf() {
  if [ "$CARCH" = "mips64el" ]; then
  python2 waf configure --prefix=/usr --alsa --doxygen $@
  else
  python2 waf configure --prefix=/usr --alsa --firewire --doxygen $@
  fi
}

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"
  _wafconf --classic --dbus
  python2 waf build $MAKEFLAGS

  # dbus-ONLY build
  cd ../$_tarname-dbus-$pkgver
  msg2 "Running D-Bus-only build"
  _wafconf --dbus
  python2 waf build $MAKEFLAGS
}

package_jack2() {
  pkgdesc="The next-generation JACK with SMP support"
  depends=('libsamplerate')
  optdepends=('libffado: FireWire support'
              'celt: NetJACK2 driver'
              'dbus-core: jackdbus'
              'python2: jack_control')
[ "$CARCH" = "mips64el" ] && \
  optdepends=('celt: NetJACK2 driver'
              'dbus-core: jackdbus'
              'python2: jack_control')
  conflicts=('jack')
  provides=('jack' 'jack-audio-connection-kit' 'jackdbus'
            'jack-audio-connection-kit-mp' 'jackmp' 'jackdmp')

  cd "$srcdir/$_tarname-$pkgver"

  python2 waf install --destdir="$pkgdir"

  # fix for major python transition
  _pyfix
}

package_jack2-dbus() {
  pkgdesc="The next-generation JACK with SMP support (for D-BUS interaction only)"
  depends=('libsamplerate' 'dbus-core')
  optdepends=('libffado: FireWire support'
              'celt: NetJACK2 driver'
              'python2: jack_control')
[ "$CARCH" = "mips64el" ] && \
  optdepends=('celt: NetJACK2 driver'
              'python2: jack_control')
  conflicts=('jack' 'jack2')
  provides=('jack' 'jack2' 'jack-audio-connection-kit' 'jackdbus'
            'jack-audio-connection-kit-mp' 'jackmp' 'jackdmp')

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

  python2 waf install --destdir="$pkgdir"

  _pyfix
}

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