File audiofile.spec of Package audiofile

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


%define so_num 1

Name:           audiofile
Version:        0.3.6
Release:        0
Summary:        An Audio File Library
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/Libraries
%define lname	libaudiofile%{so_num}
Url:            http://www.68k.org/~michael/audiofile/
Source:         http://download.gnome.org/sources/audiofile/0.3/%{name}-%{version}.tar.xz
Source2:        baselibs.conf
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  xz
%if 0%{?sles_version}
BuildRequires:  flac-devel >= 1.2.1
%else
BuildRequires:  pkgconfig(flac) >= 1.2.1
%endif
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

%build
autoreconf -fi
%configure --disable-examples
make %{?_smp_mflags}
cp -a docs install_docs
rm install_docs/Makefile*

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm %{buildroot}/%{_libdir}/*.la
# The static library is needed for "UnitTests" (from make check) to build
rm %{buildroot}/%{_libdir}/*.a

%check
make check %{?_smp_mflags}

%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.%{so_num}*

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libaudiofile.so
%{_libdir}/pkgconfig/audiofile.pc

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

%changelog
openSUSE Build Service is sponsored by