From 4232b74445f80f4175c1485a53a02c79b37a63f1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 14 Oct 2011 23:14:43 +0000 Subject: Fri Oct 14 23:14:43 UTC 2011 --- testing/jack/40-hpet-permissions.rules | 2 ++ testing/jack/99-realtime.conf | 2 ++ testing/jack/PKGBUILD | 53 +++++++++++++++++++++++++++++++ testing/jack/jack.install | 57 ++++++++++++++++++++++++++++++++++ testing/pyalpm/PKGBUILD | 23 ++++++++++++++ 5 files changed, 137 insertions(+) create mode 100644 testing/jack/40-hpet-permissions.rules create mode 100644 testing/jack/99-realtime.conf create mode 100644 testing/jack/PKGBUILD create mode 100644 testing/jack/jack.install create mode 100644 testing/pyalpm/PKGBUILD (limited to 'testing') diff --git a/testing/jack/40-hpet-permissions.rules b/testing/jack/40-hpet-permissions.rules new file mode 100644 index 000000000..5a640b34a --- /dev/null +++ b/testing/jack/40-hpet-permissions.rules @@ -0,0 +1,2 @@ +KERNEL=="rtc0", GROUP="realtime" +KERNEL=="hpet", GROUP="realtime" diff --git a/testing/jack/99-realtime.conf b/testing/jack/99-realtime.conf new file mode 100644 index 000000000..671a10851 --- /dev/null +++ b/testing/jack/99-realtime.conf @@ -0,0 +1,2 @@ +@realtime - rtprio 99 +@realtime - memlock unlimited diff --git a/testing/jack/PKGBUILD b/testing/jack/PKGBUILD new file mode 100644 index 000000000..6cc592384 --- /dev/null +++ b/testing/jack/PKGBUILD @@ -0,0 +1,53 @@ +# $Id: PKGBUILD 140421 2011-10-13 20:39:26Z schiv $ +# Maintainer: Ray Rashif +# Contributor: tobias +# Contributor: Robert Emil Berge + +pkgname=jack +_longname=jack-audio-connection-kit +pkgver=0.121.3 +pkgrel=2 +pkgdesc="A low-latency audio server" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL') +depends=('libsamplerate' 'readline') +makedepends=('doxygen' 'libffado' 'celt') +optdepends=('libffado: FireWire support' + 'celt: NetJACK driver') +url="http://jackaudio.org/" +backup=(etc/security/limits.d/99-realtime.conf) +options=('!libtool') +provides=("$_longname=$pkgver") +conflicts=("$_longname") +replaces=("$_longname") +install=$pkgname.install +source=("http://jackaudio.org/downloads/$_longname-$pkgver.tar.gz" + "99-realtime.conf" + "40-hpet-permissions.rules") +md5sums=('35f470f7422c37b33eb965033f7a42e8' + 'bb312fa74956066046d6a599ac623c98' + '6a1017041c024cea57da9bd726b664d7') + +build() { + cd "$srcdir/$_longname-$pkgver" + + ./configure --prefix=/usr \ + --libdir=/usr/lib + make +} + +package() { + cd "$srcdir/$_longname-$pkgver" + + make DESTDIR="$pkgdir" install + + # configure realtime access/scheduling + # see https://bugs.archlinux.org/task/26343 + install -Dm644 "$srcdir/99-realtime.conf" \ + "$pkgdir/etc/security/limits.d/99-realtime.conf" + + install -Dm644 "$srcdir/40-hpet-permissions.rules" \ + "$srcdir/lib/udev/rules.d/40-hpet-permissions.rules" +} + +# vim:set ts=2 sw=2 et: diff --git a/testing/jack/jack.install b/testing/jack/jack.install new file mode 100644 index 000000000..2d0db58e7 --- /dev/null +++ b/testing/jack/jack.install @@ -0,0 +1,57 @@ +_addgroup() { + # _addgroup $GROUPNAME $GID + [ ${#@} -ne 2 ] && return 1 + + echo -n " > Checking if '$1' group exists..." + if ! getent group $1 > /dev/null; then + echo "no" + echo " > Add '$1' group" + echo -n " >> checking if GID is in use..." + # no other package or user is supposed to use this gid + # delete the group and re-add it at the end without static gid + if getent group $2 > /dev/null; then + echo "yes" + firstgroup=$(getent group $2 | sed 's/:.*//') + firstusers=$(getent group $2 | sed 's/.*://') + echo " >> delete group '$firstgroup'" + groupdel $firstgroup + else + echo "no" + fi + + echo " >> add our group with proper GID" + groupadd -g $2 $1 + + if [ -n "$firstgroup" ]; then + echo " >> restore group '$firstgroup' with dynamic GID" + groupadd $firstgroup + [ -n "$firstusers" ] && gpasswd -M $firstusers $firstgroup + fi + else + echo "yes (all good)" + fi +} + +post_install() { + _addgroup realtime 112 + echo + echo " * You must be part of the 'realtime' group to use RT scheduling" + echo " * You don't need an 'RT kernel' to use RT scheduling" + echo " * If you don't need RT start jack with '--no-realtime'" + echo " * If you don't record or sequence audio you don't need RT" +} + +post_upgrade() { + _addgroup realtime 112 + echo + echo " * You must be part of the 'realtime' group to use RT scheduling" + echo " * Configuring RT through limits.conf has been deprecated" + echo " * See /etc/security/limits.d/99-realtime.conf instead" +} + +post_remove() { + [ "$(getent group realtime | cut -d ':' -f 3)" = '112' ] && \ + groupdel realtime || true +} + +# vim:set ts=2 sw=2 et: diff --git a/testing/pyalpm/PKGBUILD b/testing/pyalpm/PKGBUILD new file mode 100644 index 000000000..7a2eccdda --- /dev/null +++ b/testing/pyalpm/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer : Rémy Oudompheng + +pkgname=pyalpm +pkgver=0.5 +pkgrel=1 +pkgdesc="Libalpm bindings for Python 3" +arch=('i686' 'x86_64') +url="http://projects.archlinux.org/users/remy/pyalpm.git/" +license=('GPL') +depends=('python>=3.2' 'pacman>=4') +source=("ftp://ftp.archlinux.org/other/pyalpm/$pkgname-$pkgver.tar.gz") +md5sums=('25b078e0c56d10cf64edd026be317760') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + python setup.py build +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + python setup.py install --root=${pkgdir} +} + -- cgit v1.2.3-54-g00ecf