File audiofile.spec of Package audiofile

#
# spec file for package audiofile
#
# Copyright (c) 2012 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	libaudiofile1
Url:            http://www.68k.org/~michael/audiofile/
# bug437293
%ifarch ppc64
Obsoletes:      audiofile-64bit
%endif
Version:        0.3.4
Release:        0
#
Summary:        An Audio File Library
License:        GPL-2.0+ ; LGPL-2.1+
Group:          System/Libraries
Source:         http://download.gnome.org/sources/audiofile/0.3/%{name}-%{version}.tar.xz
Source2:        baselibs.conf
Patch1:         %{name}-remove-unused-variables.patch
BuildRequires:  alsa-devel
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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
Summary:        An Audio File Library
Group:          System/Libraries

%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
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
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

%build
%{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}/sfconvert
%{_bindir}/sfinfo
%{_mandir}/man1/sfconvert.1*
%{_mandir}/man1/sfinfo.1*

%files -n %lname
%defattr(-,root,root)
%{_libdir}/libaudiofile.so.*

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

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

%changelog
openSUSE Build Service is sponsored by