File audiofile.spec of Package audiofile

#
# spec file for package audiofile
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#



Name:           audiofile
%define lname	libaudiofile0
Url:            http://www.68k.org/~michael/audiofile/
License:        GPLv2+ ; LGPLv2.1+
Group:          System/Libraries
# bug437293
%ifarch ppc64
Obsoletes:      audiofile-64bit
%endif
#
Summary:        An Audio File Library
Version:        0.3.1
Release:        1
Source:         ftp://ftp.gnome.org/pub/GNOME/sources/audiofile/0.3/audiofile-%{version}.tar.bz2
Source2:        baselibs.conf
Patch1:         %{name}-remove-unused-variables.patch
Patch2:         %{name}-add-lm-linker.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config
BuildRequires:  gcc-c++
BuildRequires:  alsa-devel
BuildRequires:  libtool

%description
This audio file library is an implementation of the SGI audio file
library. At present, not all features of the SGI audio file library are
implemented.

This library allows the processing of audio data to and from audio
files of many common formats (currently AIFF, AIFC, WAVE, and
NeXT/Sun).

%package -n %lname
Group:          System/Libraries
Summary:        An Audio File Library

%description -n %lname
This audio file library is an implementation of the SGI audio file
library. At present, not all features of the SGI audio file library are
implemented.

This library allows the processing of audio data to and from audio
files of many common formats (currently AIFF, AIFC, WAVE, and
NeXT/Sun).

%package devel
License:        GPLv2+ ; LGPLv2.1+
Summary:        An audio file library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
This Audio File Library is an implementation of the SGI Audio File
library. At present, not all features of the SGI Audio File library are
implemented.

This library allows the processing of audio data to and from audio
files of many common formats (currently AIFF, AIFC, WAVE, and
NeXT/Sun).

%package doc
License:        GPLv2+ ; LGPLv2.1+
Summary:        An audio file library
Group:          Documentation/Man
Requires:       %{name} = %{version}

%description doc
This Audio File Library is an implementation of the SGI Audio File
library. At present, not all features of the SGI Audio File library are
implemented.

This library allows the processing of audio data to and from audio
files of many common formats (currently AIFF, AIFC, WAVE, and
NeXT/Sun).

%prep
%setup -q
%patch1
%patch2

%build
autoreconf -fiv
%{configure} \
    --with-pic \
    --disable-static
make %{?_smp_mflags}
%{__cp} -a docs install_docs
%{__rm} install_docs/Makefile*

%install
%{makeinstall}
%if 0%{?suse_version} > 1110
%{__rm} %{buildroot}/%{_libdir}/*.la
%endif

%check
%{__make} check

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc README TODO COPYING* ACKNOWLEDGEMENTS AUTHORS NEWS NOTES 
%{_bindir}/s*

%files -n %lname
%defattr(-,root,root)
%{_libdir}/*.so.*
%{_mandir}/man1/sfconvert.1*
%{_mandir}/man1/sfinfo.1*

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%if 0%{?suse_version} <= 1110
%{_libdir}/*.la
%endif

%files doc
%defattr(-, root, root)
%{_mandir}/man3/af*.3*

%changelog