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