From 483f7de4ab6a706517279a24d2efc969f4a1996d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 May 2012 17:43:57 +0000 Subject: Mon May 28 17:43:57 UTC 2012 --- testing/libcanberra/PKGBUILD | 70 +++++++++++++++++++++++++++++++++ testing/libcanberra/libcanberra.install | 23 +++++++++++ testing/libcanberra/libcanberra.xinit | 17 ++++++++ 3 files changed, 110 insertions(+) create mode 100644 testing/libcanberra/PKGBUILD create mode 100644 testing/libcanberra/libcanberra.install create mode 100644 testing/libcanberra/libcanberra.xinit (limited to 'testing/libcanberra') diff --git a/testing/libcanberra/PKGBUILD b/testing/libcanberra/PKGBUILD new file mode 100644 index 000000000..890b6fc19 --- /dev/null +++ b/testing/libcanberra/PKGBUILD @@ -0,0 +1,70 @@ +# $Id: PKGBUILD 159972 2012-05-27 13:10:57Z dreisner $ +# Maintainer: Jan de Groot + +pkgbase=libcanberra +pkgname=(libcanberra libcanberra-pulse libcanberra-gstreamer) +pkgver=0.28 +pkgrel=5 +pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification" +arch=(i686 x86_64) +license=('LGPL') +depends=('libvorbis' 'libltdl' 'alsa-lib' 'tdb') +makedepends=('gtk-doc' 'libpulse' 'gstreamer0.10' 'gtk2' 'gtk3') +options=(!emptydirs) +url=http://0pointer.de/lennart/projects/libcanberra +source=(http://0pointer.de/lennart/projects/${pkgbase}/${pkgbase}-${pkgver}.tar.gz + libcanberra.xinit) +sha256sums=('eb1f8b2cabad7f07b6e44d606a91d73e1efca4b46daf92bd553e7222bc68868c' + '68a68d66b7491f99d5aa09fe7c6ef4eb38352a2a8ff7997d184d1cbc5e80c0d3') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + ./configure --sysconfdir=/etc --prefix=/usr --localstatedir=/var \ + --disable-static --with-builtin=dso --enable-null --disable-oss \ + --enable-alsa --enable-gstreamer --enable-pulse \ + --with-systemdsystemunitdir=/usr/lib/systemd/system + make +} + +package_libcanberra() { + install=libcanberra.install + optdepends=("$pkgbase-pulse: PulseAudio driver" + "$pkgbase-gstreamer: GStreamer driver") + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -j1 DESTDIR="${pkgdir}" install + rm -f "${pkgdir}"/usr/lib/libcanberra-gtk*.la + rm -f "${pkgdir}"/usr/lib/gtk-{2,3}.0/modules/*.la + + install -d "${pkgdir}/usr/share/gconf" + mv "${pkgdir}/etc/gconf/schemas" "${pkgdir}/usr/share/gconf/" + + install -D "${srcdir}/libcanberra.xinit" \ + "${pkgdir}/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module" + + # Split plugins + for _p in pulse gstreamer; do + mkdir $_p-plugin + mv "${pkgdir}"/usr/lib/${pkgbase}-${pkgver}/${pkgbase}-$_p.* $_p-plugin + done +} + +package_libcanberra-pulse() { + pkgdesc="PulseAudio plugin for libcanberra" + depends=("$pkgbase=$pkgver-$pkgrel" 'libpulse') + + cd "${srcdir}/${pkgbase}-${pkgver}" + + mkdir -p "${pkgdir}/usr/lib/${pkgbase}-${pkgver}" + mv pulse-plugin/* "${pkgdir}/usr/lib/${pkgbase}-${pkgver}" +} + +package_libcanberra-gstreamer() { + pkgdesc="GStreamer plugin for libcanberra" + depends=("$pkgbase=$pkgver-$pkgrel" 'gstreamer0.10') + + cd "${srcdir}/${pkgbase}-${pkgver}" + + mkdir -p "${pkgdir}/usr/lib/${pkgbase}-${pkgver}" + mv gstreamer-plugin/* "${pkgdir}/usr/lib/${pkgbase}-${pkgver}" +} diff --git a/testing/libcanberra/libcanberra.install b/testing/libcanberra/libcanberra.install new file mode 100644 index 000000000..7f5012199 --- /dev/null +++ b/testing/libcanberra/libcanberra.install @@ -0,0 +1,23 @@ +pkgname=libcanberra + +post_install() { + if [ -x usr/sbin/gconfpkg ]; then + usr/sbin/gconfpkg --install ${pkgname} + fi +} + +pre_upgrade() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + pre_remove + fi +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + if [ -x usr/sbin/gconfpkg ]; then + usr/sbin/gconfpkg --uninstall ${pkgname} + fi +} diff --git a/testing/libcanberra/libcanberra.xinit b/testing/libcanberra/libcanberra.xinit new file mode 100644 index 000000000..2511e9f8a --- /dev/null +++ b/testing/libcanberra/libcanberra.xinit @@ -0,0 +1,17 @@ +#!/bin/bash + +case "$DESKTOP_SESSION" in + gnome) # Done by gnome-settings-daemon + ;; + *) + # Extra check in case DESKTOP_SESSION is not set correctly + if [[ -z $GNOME_DESKTOP_SESSION_ID ]]; then + if [[ -z $GTK_MODULES ]]; then + GTK_MODULES="canberra-gtk-module" + else + GTK_MODULES="$GTK_MODULES:canberra-gtk-module" + fi + export GTK_MODULES + fi + ;; +esac -- cgit v1.2.3-54-g00ecf