File libao.spec of Package libao

# spec file for package libao
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define soname  4
# Check for the plugin versioning
%define plugver 4
%define my_provides /tmp/my-provides
Name:           libao
Version:        1.2.0
Release:        0
Summary:        A Cross-Platform Audio Output Library
License:        GPL-2.0+
Group:          System/Libraries
Patch1:         libao-ocloexec.patch
BuildRequires:  alsa-devel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libpulse-devel
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Obsoletes:      plugin4-esd

Libao is a cross-platform audio output library.

%package -n libao%{soname}
Summary:        A Cross-Platform Audio Output Library
Group:          System/Libraries
Requires:       libao-plugins%{plugver}
# libao was last used in openSUSE 11.3
Provides:       libao = 1.1.0
Obsoletes:      libao < 1.1.0

%description -n libao%{soname}
Libao is a cross-platform audio output library.

%package plugins%{plugver}
Summary:        Main output plugins for libao
Group:          System/Libraries

%description plugins%{plugver}
This package contains the main output plugins for libao.

%package devel
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libao%{soname} = %{version}

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%setup -q

# setup libdir properly
sed -i "s:/lib:/%{_lib}:g" ao.m4


autoreconf -fiv
%configure \
	--enable-alsa \
	--enable-alsa-mmap \
	--enable-nas \
	--enable-pulse \
	--disable-static \
	--disable-arts \
make %{?_smp_mflags}

%make_install docdir=%{_docdir}/%{name}-devel
find %{buildroot} -type f -name "*.la" -delete -print
# exclude plugins from the provide-list
cat << EOF > %{my_provides}
grep -v %{_libdir}/ao/ | %{__find_provides}
chmod 755 %{my_provides}
%define _use_internal_dependency_generator 0
%define __find_provides %{my_provides}

%post -n libao%{soname} -p /sbin/ldconfig

%postun -n libao%{soname} -p /sbin/ldconfig

%files -n libao%{soname}
%dir %{_libdir}/ao
%dir %{_libdir}/ao/plugins-%{plugver}

%files plugins%{plugver}

%files devel

openSUSE Build Service is sponsored by