2.42.9-1
[arch-packages.git] / libcanberra / trunk / PKGBUILD
blobeaa86c465cb39eb75ea3c1dcf312500512adb9ae
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
4 pkgname=libcanberra
5 pkgver=0.30+r2+gc0620e4
6 pkgrel=1
7 epoch=1
8 pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification"
9 url="http://0pointer.de/lennart/projects/libcanberra"
10 arch=(x86_64)
11 license=(LGPL)
12 depends=(libvorbis libltdl alsa-lib libpulse tdb sound-theme-freedesktop)
13 makedepends=(gtk-doc gtk2 gtk3 git)
14 provides=(libcanberra-pulse libcanberra{,-gtk,-gtk3}.so)
15 replaces=("libcanberra-pulse<0.30+2+gc0620e4-4")
16 options=(libtool debug)
17 _commit=c0620e432650e81062c1967cc669829dbd29b310  # master
18 source=("git+http://git.0pointer.net/clone/libcanberra.git#commit=$_commit"
19         40-libcanberra-gtk-module.sh
20         libcanberra-multi-backend.patch)
21 sha256sums=('SKIP'
22             'a0d0b135d3fea5c703a5f84208b79d66f671b082ae85f67b629ee2568a7ddc30'
23             'de146cae3e40a16b38c8edb4f1a3a423c64eb9c5000e36c316b677e9909c9b06')
25 pkgver() {
26   cd libcanberra
27   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
30 prepare() {
31   cd libcanberra
33   # https://bugs.archlinux.org/task/71341
34   # https://bugs.freedesktop.org/show_bug.cgi?id=51662
35   git apply -3 ../libcanberra-multi-backend.patch
37   ./autogen.sh
40 build() {
41   cd libcanberra
42   ./configure --sysconfdir=/etc --prefix=/usr --localstatedir=/var \
43       --disable-static --with-builtin=dso --enable-null --disable-oss \
44       --enable-alsa --enable-pulse \
45       --with-systemdsystemunitdir=/usr/lib/systemd/system --enable-gtk-doc
46   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
47   make
50 package_libcanberra() {
51   cd libcanberra
53   make -j1 DESTDIR="$pkgdir" install
55   rm "$pkgdir"/usr/lib/*.la
56   rm "$pkgdir"/usr/lib/gtk-{2,3}.0/modules/*.la
58   # FS#52370: Remove login, logout and system-ready sounds.
59   # We have no sound themes that include these so do not play them.
60   rm -r "$pkgdir"/usr/share/{gnome,gdm}
62   install -Dt "$pkgdir/etc/X11/xinit/xinitrc.d" ../40-libcanberra-gtk-module.sh
65 # vim:set sw=2 et: