db-move: moved grilo-plugins from [staging] to [testing] (x86_64)
[arch-packages.git] / libcanberra / repos / extra-x86_64 / PKGBUILD
blobe6414cb7e9795ded80eea8093d55a53dfaf17a1a
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=3
7 epoch=1
8 pkgdesc="A small and lightweight implementation of the XDG Sound Theme Specification"
9 url="https://0pointer.net/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 optdepends=('gtk3: canberra-gtk-play')
15 provides=(libcanberra-pulse libcanberra{,-gtk,-gtk3}.so)
16 replaces=("libcanberra-pulse<0.30+2+gc0620e4-4")
17 options=(libtool)
18 _commit=c0620e432650e81062c1967cc669829dbd29b310  # master
19 source=("git+https://git.0pointer.net/clone/libcanberra.git#commit=$_commit"
20         40-libcanberra-gtk-module.sh
21         libcanberra-multi-backend.patch)
22 sha256sums=('SKIP'
23             'a0d0b135d3fea5c703a5f84208b79d66f671b082ae85f67b629ee2568a7ddc30'
24             'de146cae3e40a16b38c8edb4f1a3a423c64eb9c5000e36c316b677e9909c9b06')
26 pkgver() {
27   cd libcanberra
28   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
31 prepare() {
32   cd libcanberra
34   # https://bugs.archlinux.org/task/71341
35   # https://bugs.freedesktop.org/show_bug.cgi?id=51662
36   git apply -3 ../libcanberra-multi-backend.patch
38   ./autogen.sh
41 build() {
42   cd libcanberra
43   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
44       --disable-static --with-builtin=dso --enable-null --disable-oss \
45       --enable-alsa --enable-pulse \
46       --with-systemdsystemunitdir=/usr/lib/systemd/system --enable-gtk-doc
47   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
48   make
51 package() {
52   cd libcanberra
54   make -j1 DESTDIR="$pkgdir" install
56   rm "$pkgdir"/usr/lib/*.la
57   rm "$pkgdir"/usr/lib/gtk-{2,3}.0/modules/*.la
59   # FS#52370: Remove login, logout and system-ready sounds.
60   # We have no sound themes that include these so do not play them.
61   rm -r "$pkgdir"/usr/share/{gnome,gdm}
63   install -Dt "$pkgdir/etc/X11/xinit/xinitrc.d" ../40-libcanberra-gtk-module.sh
66 # vim:set sw=2 sts=-1 et: