[LAU] jack2 package for Arch Linux, to get rid of the freewheeling bug

Ralf Mardorf ralf.mardorf at alice-dsl.net
Sat Feb 27 19:01:05 UTC 2016


Hi,

I noticed that the AUR jack2-git package has got an odd versioning and
perhaps it's more comfortable to name the package jack2, if the package
from git should be just a temporarily solution.

I didn't test the build package, but it builds well, most likely will
work and it might save you some time, if you don't need to edit the
PKGBUILD too.

jack2-git 1.9.10-g1ed50c9 or most likely a more current version from git
too, is needed to get rid of the freewheeling bug, that's why I edited the
AUR jack2-git PKGBUILD. It's a dirty edit, but should work and perhaps is
still more clean than the original jackd2-git,
https://aur.archlinux.org/packages/jack2-git/ ;).




The information is from:

 Date:    Wed, 24 Feb 2016 00:38:22 +0100
 From:    Robin Gareus
 To:      ardour-users at lists.ardour.org
 Subject: Re: [Ardour-Users] Export hangs after script executing

 [snip]

 1.9.11 (actually git: 1.9.10-g1ed50c92) is known to be good WRT to this
 freewheeling bug.




Arch Linux PKGBUILD:

 Ralf_Mardorf commented on 2016-02-27 18:15 
 https://aur.archlinux.org/pkgbase/jack2-git/#news

Hi,

consider to give the package an appropriated version number.

Instead of

[rocketmouse at archlinux jack2]$ git rev-list --count master
3425

the following to me is more reasonable:

[rocketmouse at archlinux jack2]$ git describe|cut -d"v" -f2|sed -r 's/^V//;s/([^-]*-g)/r\1/;s/-/./g'
1.9.10.r177.g7bdad49

Oops, resp.:

[rocketmouse at archlinux jack2]$ git describe|sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
1.9.10.r177.g7bdad49

The correct dependency seems to be "python2-dbus" and not "python2".

Assumed somebody temporarily wants to build jack2 from git, but switch back to jack2 from the official repository, as soon as 1.9.11 is released, you could replace the original PKGBUILD by this one [1].

To replace .SRCINFO after replacing the PKGBUILD run

  makepkg --printsrcinfo > .SRCINFO

Regards,
Ralf


[1]
[rocketmouse at archlinux jack2-rocketmouse]$ cat PKGBUILD 
pkgbase=jack2
pkgname=('jack2' 'jack2-dbus')
#pkgname= # single build (overrides split)
_tarname=jack
pkgver=1.9.10.r177.g7bdad49
pkgrel=1
arch=('i686' 'x86_64')
url="http://jackaudio.org/"
backup=(etc/security/limits.d/99-audio.conf)
license=('GPL')
makedepends=('python2-dbus' 'celt' 'opus' 'libsamplerate' 'git' 'libffado')
source=("git+https://github.com/jackaudio/jack2"
        '99-audio.conf'
        '40-hpet-permissions.rules')
md5sums=('SKIP'
         'ae65b7c9ebe0fff6c918ba9d97ae342d'
         '471aad533ff56c5d3cbbf65ce32cadef')

_gitname='jack2'

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

_wafconf() {
  # default=64,  AUR=128,  kxstudio=256  --clients= 
  # default=768, AUR=1536, kxstudio=2048 --ports-per-application= 

  python2 waf configure --prefix=/usr \
    --clients=64 --ports-per-application=768 \
    --alsa  --firewire $@
}

_isbuild() {
  printf "%s\n" ${pkgname[@]} | grep -qx $1
}

pkgver() {
  cd jack2
  echo $(git describe|cut -d"v" -f2|sed -r 's/^V//;s/([^-]*-g)/r\1/;s/-/./g')
}

prepare() {
  # we may do 2 different builds
  cp -r $_gitname $_gitname-dbus
}

build() {
  cd "$srcdir"

  # mixed dbus/classic build
  if _isbuild jack2; then
    cd $_gitname
    msg2 "Running Mixed D-Bus/Classic build"
    _wafconf --classic --dbus
    python2 waf build $MAKEFLAGS
    cd ..
  fi

  # dbus-ONLY build
  if _isbuild jack2-dbus; then
    cd $_gitname-dbus
    msg2 "Running D-Bus-only build"
    _wafconf --dbus
    python2 waf build $MAKEFLAGS
    cd ..
  fi
}

package_jack2() {
  ! _isbuild jack2 && return 0

  pkgdesc="The next-generation JACK with SMP support"
  depends=('libsamplerate' 'opus' 'celt' 'libffado')
  optdepends=('python2-dbus: jack_control')
  conflicts=('jack')
  provides=('jack' 'jackmp' 'jackdmp' 'jackdbus')

  cd "$srcdir/$_gitname"

  python2 waf install --destdir="$pkgdir"

  # fix for major python transition
  _pyfix

  # configure realtime access/scheduling
  install -Dm644 "$srcdir/99-audio.conf" \
    "$pkgdir/etc/security/limits.d/99-audio.conf"

  install -Dm644 "$srcdir/40-hpet-permissions.rules" \
    "$pkgdir/usr/lib/udev/rules.d/40-hpet-permissions.rules"
}

package_jack2-dbus() {
  ! _isbuild jack2-dbus && return 0

  pkgdesc="The next-generation JACK with SMP support (for D-BUS interaction only)"
  depends=('libsamplerate' 'celt' 'opus' 'libffado')
  optdepends=('python2-dbus: jack_control')
  conflicts=('jack' 'jack2')
  provides=('jack' 'jack2' 'jackmp' 'jackdmp' 'jackdbus')

  cd "$srcdir/$_gitname-dbus"

  python2 waf install --destdir="$pkgdir"

  _pyfix

  install -Dm644 "$srcdir/99-audio.conf" \
    "$pkgdir/etc/security/limits.d/99-audio.conf"

  install -Dm644 "$srcdir/40-hpet-permissions.rules" \
    "$pkgdir/usr/lib/udev/rules.d/40-hpet-permissions.rules"
}


More information about the Linux-audio-user mailing list