File libcanberra.spec of Package libcanberra

#
# spec file for package libcanberra (Version 0.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libcanberra
Summary:        Portable Sound Event Library
BuildRequires:  alsa-devel gtk-doc gtk2-devel libpulse-devel >= 0.9.11 libvorbis-devel update-desktop-files
Url:            http://0pointer.de/lennart/projects/libcanberra/
License:        LGPLv2+
Version:        0.7
Release:        1
Group:          System/Libraries
Source:         libcanberra-%{version}.tar.bz2
Source1:        libcanberra-gtk-module.sh
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package libcanberra0
Summary:        Portable Sound Event Library
Group:          System/Libraries
Requires:       sound-theme-freedesktop
Requires:       libpulse0 >= 0.9.11

%description
libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOME. It comes with several backends (ALSA, PulseAudio, null) and is designed to be portable. It consists of the following parts:

   1. libcanberra: the main library
   2. libcanberra-gtk: some glue code to make it easier to use libcanberra from Gtk+ applications
   3. libcanberra-gtk-module: a Gtk+ module that uses libcanberra-gtk to trigger input feedback event sounds

Authors:
--------
    Lennart Poettering

%description libcanberra0
libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOME. It comes with several backends (ALSA, PulseAudio, null) and is designed to be portable. It consists of the following parts:

   1. libcanberra: the main library
   2. libcanberra-gtk: some glue code to make it easier to use libcanberra from Gtk+ applications
   3. libcanberra-gtk-module: a Gtk+ module that uses libcanberra-gtk to trigger input feedback event sounds

Authors:
--------
    Lennart Poettering

%package        gtk2
Summary:        Gtk+ Bindings for libcanberra
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description gtk2
libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOME. It comes with several backends (ALSA, PulseAudio, null) and is designed to be portable. It consists of the following parts:

   1. libcanberra: the main library
   2. libcanberra-gtk: some glue code to make it easier to use libcanberra from Gtk+ applications
   3. libcanberra-gtk-module: a Gtk+ module that uses libcanberra-gtk to trigger input feedback event sounds

This package contains the Gtk+ bindings for libcanberra

%package devel
Summary:        Development Files for libcanberra Client Development
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Requires:       gtk-doc
Requires:       gtk2-devel

%description devel
libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops, such as GNOME. It comes with several backends (ALSA, PulseAudio, null) and is designed to be portable. It consists of the following parts:

   1. libcanberra: the main library
   2. libcanberra-gtk: some glue code to make it easier to use libcanberra from Gtk+ applications
   3. libcanberra-gtk-module: a Gtk+ module that uses libcanberra-gtk to trigger input feedback event sounds

Development Files for libcanberra Client Development

Authors:
--------
    Lennart Poettering

%prep
%setup -q

%build
%configure --disable-static --disable-rpath --enable-pulse --enable-alsa --enable-null --with-builtin=dso
make %{?jobs:-j%jobs}

%install
%makeinstall
%suse_update_desktop_file libcanberra-login-sound
find $RPM_BUILD_ROOT \( -name *.a -o -name *.la \) -exec rm {} \;
install -D -m755  %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/libcanberra-gtk-module.sh
rm $RPM_BUILD_ROOT%{_libdir}/libcanberra/libcanberra-multi.so
rm $RPM_BUILD_ROOT%{_datadir}/doc/libcanberra/README

%post libcanberra0 -p /sbin/ldconfig
%postun libcanberra0 -p /sbin/ldconfig

%post gtk2 -p /sbin/ldconfig
%postun gtk2 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files libcanberra0
%defattr(-,root,root)
%doc README LGPL
%{_libdir}/libcanberra.so.*
%dir %{_libdir}/libcanberra
%{_libdir}/libcanberra/libcanberra-alsa.so
%{_libdir}/libcanberra/libcanberra-pulse.so
%{_libdir}/libcanberra/libcanberra-null.so

%files gtk2
%defattr(-,root,root)
%{_libdir}/libcanberra-gtk.so.*
%{_libdir}/gtk-2.0/modules/libcanberra-gtk-module.so
%{_sysconfdir}/X11/xinit/xinitrc.d/libcanberra-gtk-module.sh
%{_bindir}/canberra-gtk-play
%{_datadir}/gnome/autostart/libcanberra-login-sound.desktop
%{_datadir}/gnome/shutdown/libcanberra-logout-sound.sh

%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/libcanberra
%{_includedir}/canberra-gtk.h
%{_includedir}/canberra.h
%{_libdir}/libcanberra-gtk.so
%{_libdir}/libcanberra.so
%{_libdir}/pkgconfig/libcanberra-gtk.pc
%{_libdir}/pkgconfig/libcanberra.pc

%changelog
openSUSE Build Service is sponsored by