118c6a
Summary:	Library for reading and writing sound files
118c6a
Name:		libsndfile
118c6a
Version:	1.0.25
118c6a
Release:	10%{?dist}
118c6a
License:	LGPLv2+ and GPLv2+ and BSD
118c6a
Group:		System Environment/Libraries
118c6a
URL:		http://www.mega-nerd.com/libsndfile/
118c6a
Source0:	http://www.mega-nerd.com/libsndfile/files/libsndfile-%{version}.tar.gz
118c6a
Patch0:		%{name}-1.0.25-system-gsm.patch
118c6a
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
118c6a
118c6a
BuildRequires:	alsa-lib-devel
118c6a
BuildRequires:	flac-devel
118c6a
BuildRequires:	libogg-devel
118c6a
BuildRequires:	libvorbis-devel
118c6a
BuildRequires:	pkgconfig
118c6a
BuildRequires:	sqlite-devel
118c6a
BuildRequires:	gsm-devel
118c6a
BuildRequires:	libtool
118c6a
118c6a
118c6a
%description
118c6a
libsndfile is a C library for reading and writing sound files such as
118c6a
AIFF, AU, WAV, and others through one standard interface. It can
118c6a
currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
118c6a
64-bit floating point WAV files and a number of compressed formats. It
118c6a
compiles and runs on *nix, MacOS, and Win32.
118c6a
118c6a
118c6a
%package devel
118c6a
Summary:	Development files for libsndfile
118c6a
Group:		Development/Libraries
118c6a
Requires:	%{name}%{?_isa} = %{version}-%{release} pkgconfig
118c6a
118c6a
118c6a
%description devel
118c6a
libsndfile is a C library for reading and writing sound files such as
118c6a
AIFF, AU, WAV, and others through one standard interface.
118c6a
This package contains files needed to develop with libsndfile.
118c6a
118c6a
118c6a
%package utils
118c6a
Summary:	Command Line Utilities for libsndfile
118c6a
Group:		Applications/Multimedia
118c6a
Requires:	%{name} = %{version}-%{release}
118c6a
Obsoletes:	libsndfile < 1.0.20-4
118c6a
118c6a
118c6a
%description utils
118c6a
libsndfile is a C library for reading and writing sound files such as
118c6a
AIFF, AU, WAV, and others through one standard interface.
118c6a
This package contains command line utilities for libsndfile.
118c6a
118c6a
118c6a
%prep
118c6a
%setup -q
118c6a
%patch0 -p1
118c6a
rm -r src/GSM610 ; autoreconf -I M4 -fiv # for system-gsm patch
118c6a
#also for aarch64 support which requires autotools 2.69+
118c6a
118c6a
118c6a
%build
118c6a
%configure \
118c6a
	--disable-dependency-tracking \
118c6a
	--enable-sqlite \
118c6a
	--enable-alsa \
118c6a
	--enable-largefile \
118c6a
	--disable-static
118c6a
118c6a
# Get rid of rpath
118c6a
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
118c6a
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
118c6a
118c6a
make %{?_smp_mflags}
118c6a
118c6a
118c6a
%install
118c6a
rm -rf $RPM_BUILD_ROOT __docs
118c6a
make install DESTDIR=$RPM_BUILD_ROOT
118c6a
cp -pR $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev/html __docs
118c6a
rm -rf $RPM_BUILD_ROOT%{_docdir}/libsndfile1-dev
118c6a
118c6a
# fix multilib issues
118c6a
%if %{__isa_bits} == 64
118c6a
%define wordsize 64
118c6a
%else
118c6a
%define wordsize 32
118c6a
%endif
118c6a
118c6a
mv %{buildroot}%{_includedir}/sndfile.h \
118c6a
   %{buildroot}%{_includedir}/sndfile-%{wordsize}.h
118c6a
118c6a
cat > %{buildroot}%{_includedir}/sndfile.h <
118c6a
#include <bits/wordsize.h>
118c6a
118c6a
#if __WORDSIZE == 32
118c6a
# include "sndfile-32.h"
118c6a
#elif __WORDSIZE == 64
118c6a
# include "sndfile-64.h"
118c6a
#else
118c6a
# error "unexpected value for __WORDSIZE macro"
118c6a
#endif
118c6a
EOF
118c6a
118c6a
%if 0%{?rhel} != 0
118c6a
rm -f %{buildroot}%{_bindir}/sndfile-jackplay
118c6a
%endif
118c6a
118c6a
118c6a
%check
118c6a
LD_LIBRARY_PATH=$PWD/src/.libs make check
118c6a
118c6a
118c6a
%clean
118c6a
rm -rf $RPM_BUILD_ROOT
118c6a
118c6a
118c6a
%post -p /sbin/ldconfig
118c6a
118c6a
%postun -p /sbin/ldconfig
118c6a
118c6a
118c6a
%files
118c6a
%defattr(-,root,root,-)
118c6a
%doc COPYING AUTHORS README NEWS
118c6a
%{_libdir}/%{name}.so.*
118c6a
118c6a
%files utils
118c6a
%defattr(-,root,root,-)
118c6a
%{_bindir}/sndfile-cmp
118c6a
%{_bindir}/sndfile-concat
118c6a
%{_bindir}/sndfile-convert
118c6a
%{_bindir}/sndfile-deinterleave
118c6a
%{_bindir}/sndfile-info
118c6a
%{_bindir}/sndfile-interleave
118c6a
%{_bindir}/sndfile-metadata-get
118c6a
%{_bindir}/sndfile-metadata-set
118c6a
%{_bindir}/sndfile-play
118c6a
%{_bindir}/sndfile-regtest
118c6a
%{_bindir}/sndfile-salvage
118c6a
%{_mandir}/man1/sndfile-cmp.1*
118c6a
%{_mandir}/man1/sndfile-concat.1*
118c6a
%{_mandir}/man1/sndfile-convert.1*
118c6a
%{_mandir}/man1/sndfile-deinterleave.1*
118c6a
%{_mandir}/man1/sndfile-info.1*
118c6a
%{_mandir}/man1/sndfile-interleave.1*
118c6a
%{_mandir}/man1/sndfile-metadata-get.1*
118c6a
%{_mandir}/man1/sndfile-metadata-set.1*
118c6a
%{_mandir}/man1/sndfile-play.1*
118c6a
118c6a
%files devel
118c6a
%defattr(-,root,root,-)
118c6a
%doc __docs/*
118c6a
%doc ChangeLog
118c6a
%exclude %{_libdir}/%{name}.la
118c6a
%{_includedir}/sndfile.h
118c6a
%{_includedir}/sndfile.hh
118c6a
%{_includedir}/sndfile-%{wordsize}.h
118c6a
%{_libdir}/%{name}.so
118c6a
%{_libdir}/pkgconfig/sndfile.pc
118c6a
118c6a
118c6a
%changelog
118c6a
* Sat Aug  2 2014 Peter Robinson <pbrobinson@redhat.com> 1.0.25-10
118c6a
- Generic 32/64 bit platform detection - fix ppc64le build (#1126140)
118c6a
118c6a
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.25-9
118c6a
- Mass rebuild 2014-01-24
118c6a
118c6a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.25-8
118c6a
- Mass rebuild 2013-12-27
118c6a
118c6a
* Mon Jun 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-7
118c6a
- fix support for aarch64, another part (#969831)
118c6a
118c6a
* Wed Mar 27 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-6
118c6a
- fix support for aarch64 (#925887)
118c6a
118c6a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-5
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
118c6a
118c6a
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-4
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
118c6a
118c6a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
118c6a
118c6a
* Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
118c6a
- Patch to use system libgsm instead of a bundled copy.
118c6a
- Make main package dep in -devel ISA qualified.
118c6a
- Drop -octave Provides (not actually built with octave > 3.0).
118c6a
- Don't build throwaway static lib.
118c6a
- Run test suite during build.
118c6a
118c6a
* Thu Jul 14 2011 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-1
118c6a
- Update to 1.0.25
118c6a
- fixes integer overflow by processing certain PAF audio files (#721240)
118c6a
118c6a
* Sun Mar 27 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.24-1
118c6a
- Update to 1.0.24
118c6a
118c6a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
118c6a
118c6a
* Sat Oct 16 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.23-1
118c6a
- Update to 10.0.23
118c6a
118c6a
* Tue Oct 05 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.22-1
118c6a
- Update to 10.0.22
118c6a
118c6a
* Tue May 11 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.21-1
118c6a
- Update to 10.0.21
118c6a
- Do not include the static library in the package (RHBZ#556074)
118c6a
- Remove BR on jack since sndfile-jackplay is not provided anymore
118c6a
118c6a
* Mon Feb  1 2010 Stepan Kasal <skasal@redhat.com> - 1.0.20-5
118c6a
- Do not build against Jack on RHEL
118c6a
- Fix the Source0: URL
118c6a
- Fix the licence tag
118c6a
118c6a
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-4
118c6a
- Split utils into a subpackage
118c6a
118c6a
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-3
118c6a
- Add FLAC/Ogg/Vorbis support (BR: libvorbis-devel)
118c6a
- Make build verbose
118c6a
- Remove rpath
118c6a
- Fix ChangeLog encoding
118c6a
- Move the big Changelog to the devel package
118c6a
118c6a
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
118c6a
118c6a
* Sat Jun 06 2009 Lennart Poettering <lpoetter@redhat.com> - 1.0.20-1
118c6a
- Updated to 1.0.20
118c6a
118c6a
* Tue Mar 03 2009 Robert Scheck <robert@fedoraproject.org> - 1.0.17-8
118c6a
- Rebuilt against libtool 2.2
118c6a
118c6a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-7
118c6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
118c6a
118c6a
* Thu Oct 25 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-6
118c6a
- Removed spurious #endif in the libsndfile.h wrapper. Thx to Edward
118c6a
  Sheldrake for finding it. Fixes #468508.
118c6a
- Fix build for autoconf-2.63
118c6a
118c6a
* Thu Oct 23 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-5
118c6a
- Fixed multilib conflict. #342401
118c6a
- Made flac support actually work correctly.
118c6a
118c6a
* Thu Aug  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.17-4
118c6a
- fix license tag
118c6a
118c6a
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.17-3
118c6a
- Autorebuild for GCC 4.3
118c6a
118c6a
* Thu Sep 20 2007 Andreas Thienemann <andreas@bawue.net> - 1.0.17-2
118c6a
- Adding FLAC support to libsndfile courtesy of gentoo, #237575
118c6a
- Fixing CVE-2007-4974. Thanks to the gentoo people for the patch, #296221
118c6a
118c6a
* Fri Sep 08 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.17-1
118c6a
- Updated to 1.0.17
118c6a
118c6a
* Sun Apr 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.16-1
118c6a
- Updated to 1.0.16
118c6a
118c6a
* Thu Mar 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.15-1
118c6a
- Updated to 1.0.15
118c6a
118c6a
* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.0.14-1.fc5
118c6a
- Updated to 1.0.14
118c6a
- Dropped patch0
118c6a
118c6a
* Thu May 12 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-3
118c6a
- rebuilt
118c6a
118c6a
* Sat Mar  5 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-2
118c6a
- Fix format string bug (#149863).
118c6a
- Drop explicit Epoch 0.
118c6a
118c6a
* Sat Dec  4 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.11-0.fdr.1
118c6a
- Update to 1.0.11.
118c6a
118c6a
* Wed Oct 13 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.10-0.fdr.1
118c6a
- Update to 1.0.10, update URLs, include ALSA support.
118c6a
- Disable dependency tracking to speed up the build.
118c6a
- Add missing ldconfig invocations.
118c6a
- Make -devel require pkgconfig.
118c6a
- Include developer docs in -devel.
118c6a
- Provide -octave in main package, own more related dirs.
118c6a
- Bring specfile up to date with current spec templates.
118c6a
118c6a
* Sat Apr 12 2003 Dams <anvil[AT]livna.org>
118c6a
- Initial build.