From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/rtkit/PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ extra/rtkit/rtkit.install | 26 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 extra/rtkit/PKGBUILD create mode 100644 extra/rtkit/rtkit.install (limited to 'extra/rtkit') diff --git a/extra/rtkit/PKGBUILD b/extra/rtkit/PKGBUILD new file mode 100644 index 000000000..553c69d38 --- /dev/null +++ b/extra/rtkit/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 111724 2011-02-28 21:05:00Z heftig $ +# Maintainer: Jan "heftig" Steffens +# Contributor: Corrado Primier + +pkgname=rtkit +pkgver=0.10 +pkgrel=1 +pkgdesc="Realtime Policy and Watchdog Daemon" +arch=('i686' 'x86_64') +url="http://git.0pointer.de/?p=rtkit.git" +license=('GPL' 'custom:BSD') +depends=('dbus' 'polkit') +makedepends=('pkgconfig') +install=rtkit.install +source=(http://0pointer.de/public/$pkgname-$pkgver.tar.gz) +md5sums=('9ab7f2a25ddf05584ea2216dfe4cefd4') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --libexecdir=/usr/lib --prefix=/usr --sysconfdir=/etc + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + # DBus configuration + mkdir -p "$pkgdir/usr/share/dbus-1/interfaces" + ./rtkit-daemon --introspect >"$pkgdir/usr/share/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml" + + # Client license + mkdir -p "$pkgdir/usr/share/licenses/rtkit" + sed -ne '4,25p' rtkit.c >"$pkgdir/usr/share/licenses/rtkit/COPYING" +} diff --git a/extra/rtkit/rtkit.install b/extra/rtkit/rtkit.install new file mode 100644 index 000000000..0ec1fab52 --- /dev/null +++ b/extra/rtkit/rtkit.install @@ -0,0 +1,26 @@ +post_install() { + getent group rtkit &>/dev/null || /usr/sbin/groupadd -g 133 rtkit || return 1 + getent passwd rtkit &>/dev/null || /usr/sbin/useradd -u 133 -g rtkit -c 'RealtimeKit' -s /sbin/nologin -d /proc rtkit || return 1 + + dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 + + true +} + +post_upgrade() { + if (( $(vercmp $2 0.10) < 0 )); then + # Get rid of old user and group + post_remove + fi + + post_install +} + +post_remove() { + getent passwd rtkit &>/dev/null && /usr/sbin/userdel -f rtkit + getent group rtkit &>/dev/null && /usr/sbin/groupdel rtkit + + true +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf