mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-06 12:47:13 +08:00
121 lines
3.4 KiB
Bash
121 lines
3.4 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Michael Haesel <michael[dot]haesel[at]gmail[dot]com>
|
|
# With contributions from https://www.archlinux.org/packages/community/x86_64/jack2/
|
|
|
|
pkgbase=jack2
|
|
pkgname=('jack2' 'jack2-dbus')
|
|
#pkgname= # single build (overrides split)
|
|
_tarname=jack
|
|
pkgver=1.9.8
|
|
pkgrel=3
|
|
arch=('x86_64')
|
|
url="http://jackaudio.org/"
|
|
backup=(etc/security/limits.d/99-audio.conf)
|
|
license=('GPL')
|
|
makedepends=('python2' 'doxygen' 'libffado'
|
|
'libsamplerate' 'dbus-core' 'celt')
|
|
source=("https://dl.dropbox.com/u/28869550/${_tarname}-${pkgver}.tgz"
|
|
'99-audio.conf'
|
|
'40-hpet-permissions.rules')
|
|
sha256sums=('4c712eac54bdf5b4c0245f728654459d0437e5cdab84e7ac633be6fe4502081d'
|
|
'3b779961c20e072467b8fdc031cebe6a9f2512c89c5e5da4b4c523fe01e2f038'
|
|
'58df6c563b5a2aac297e70d4c6d96e1103c5f1f8d9bd051d944b39416b65cd5f')
|
|
|
|
_pyfix() {
|
|
sed -i 's:bin/env python:bin/env python2:' \
|
|
"${pkgdir}/usr/bin/jack_control"
|
|
}
|
|
|
|
_wafconf() {
|
|
python2 waf configure --prefix=/usr \
|
|
--alsa \
|
|
--firewire \
|
|
--doxygen $@
|
|
}
|
|
|
|
_isbuild() {
|
|
printf "%s\n" ${pkgname[@]} | grep -qx $1
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${_tarname}-${pkgver}"
|
|
|
|
# fix doxygen building
|
|
sed -i 's:build/default/html:html:' "${_tarname}-${pkgver}/wscript"
|
|
|
|
# we may do 2 different builds
|
|
cp -r "${_tarname}-${pkgver}" "${_tarname}-dbus-${pkgver}"
|
|
|
|
# mixed dbus/classic build
|
|
if _isbuild jack2; then
|
|
cd "${_tarname}-${pkgver}"
|
|
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 "${_tarname}-dbus-${pkgver}"
|
|
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' 'celt')
|
|
optdepends=('libffado: FireWire support'
|
|
'dbus-core: jackdbus'
|
|
'python2: jack_control')
|
|
conflicts=('jack')
|
|
provides=('jack' 'jackmp' 'jackdmp' 'jackdbus' 'jack-audio-connection-kit')
|
|
|
|
cd "${srcdir}/${_tarname}-${pkgver}/${_tarname}-${pkgver}"
|
|
|
|
python2 waf install --destdir="${pkgdir}"
|
|
|
|
# fix for major python transition
|
|
_pyfix
|
|
|
|
# configure realtime access/scheduling
|
|
# see https://bugs.archlinux.org/task/26343
|
|
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' 'dbus-core')
|
|
optdepends=('libffado: FireWire support'
|
|
'python2: jack_control')
|
|
conflicts=('jack' 'jack2')
|
|
provides=('jack' 'jack2' 'jackmp' 'jackdmp' 'jackdbus' 'jack-audio-connection-kit')
|
|
|
|
cd "${srcdir}/${_tarname}-${pkgver}/${_tarname}-dbus-${pkgver}"
|
|
|
|
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"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|