summaryrefslogtreecommitdiff
path: root/extra/libcanberra/PKGBUILD
blob: 93145cbcdfb8fc891bad7016e016d906382e160a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# $Id: PKGBUILD 122251 2011-05-03 10:40:20Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=libcanberra
pkgname=(libcanberra libcanberra-pulse libcanberra-gstreamer)
pkgver=0.28
pkgrel=1
pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification"
arch=(i686 x86_64)
license=('LGPL')
depends=('libvorbis' 'libtool' '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-gtk-module.sh)
md5sums=('c198b4811598c4c161ff505e4531b02c'
         '21141257a1be80f3bc329829ff13b314')

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=/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-gtk-module.sh" \
    "${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}" 
}