9178b9
Summary:	Library for reading and writing sound files
9178b9
Name:		libsndfile
9178b9
Version:	1.0.31
9178b9
Release:	7%{?dist}
9178b9
License:	LGPLv2+ and GPLv2+ and BSD
9178b9
URL:		http://libsndfile.github.io/libsndfile/
9178b9
Source0:        https://github.com/libsndfile/libsndfile/releases/download/%{version}/libsndfile-%{version}.tar.bz2
9178b9
Patch0:		libsndfile-1.0.25-system-gsm.patch
9178b9
Patch1:		libsndfile-1.0.25-zerodivfix.patch
9178b9
# from upstream, for <= 1.0.31, rhbz#1985029
9178b9
Patch2:		libsndfile-1.0.31-deb669ee.patch
9178b9
# from upstream, fix #2030508, for <= 1.0.31
9178b9
Patch3:		libsndfile-1.0.31-ced91d7b.patch
9178b9
BuildRequires:  gcc-c++
9178b9
BuildRequires:	alsa-lib-devel
9178b9
BuildRequires:	flac-devel
9178b9
BuildRequires:	gcc
9178b9
BuildRequires:	libogg-devel
9178b9
BuildRequires:	libvorbis-devel
9178b9
BuildRequires:	pkgconfig
9178b9
BuildRequires:	sqlite-devel
9178b9
BuildRequires:	gsm-devel
9178b9
BuildRequires:	libtool
9178b9
BuildRequires:	make
9178b9
BuildRequires:	python3
9178b9
BuildRequires:  opus-devel
9178b9
9178b9
9178b9
%description
9178b9
libsndfile is a C library for reading and writing sound files such as
9178b9
AIFF, AU, WAV, and others through one standard interface. It can
9178b9
currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and
9178b9
64-bit floating point WAV files and a number of compressed formats. It
9178b9
compiles and runs on *nix, MacOS, and Win32.
9178b9
9178b9
9178b9
%package devel
9178b9
Summary:	Development files for libsndfile
9178b9
Requires:	%{name}%{?_isa} = %{version}-%{release} pkgconfig
9178b9
9178b9
9178b9
%description devel
9178b9
libsndfile is a C library for reading and writing sound files such as
9178b9
AIFF, AU, WAV, and others through one standard interface.
9178b9
This package contains files needed to develop with libsndfile.
9178b9
9178b9
9178b9
%package utils
9178b9
Summary:	Command Line Utilities for libsndfile
9178b9
Requires:	%{name} = %{version}-%{release}
9178b9
9178b9
9178b9
%description utils
9178b9
libsndfile is a C library for reading and writing sound files such as
9178b9
AIFF, AU, WAV, and others through one standard interface.
9178b9
This package contains command line utilities for libsndfile.
9178b9
9178b9
9178b9
%prep
9178b9
%setup -q
9178b9
%patch0 -p1 -b .system-gsm
9178b9
rm -r src/GSM610
9178b9
# TODO: check if this patch is still needed
9178b9
%patch1 -p1 -b .zerodivfix
9178b9
%patch2 -p1 -b .deb669ee
9178b9
%patch3 -p1 -b .ced91d7b
9178b9
9178b9
%build
9178b9
autoreconf -I M4 -fiv # for system-gsm patch
9178b9
%configure \
9178b9
	--disable-dependency-tracking \
9178b9
	--enable-sqlite \
9178b9
	--enable-alsa \
9178b9
	--enable-largefile \
9178b9
	--disable-static
9178b9
9178b9
# Get rid of rpath
9178b9
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
9178b9
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
9178b9
9178b9
%make_build
9178b9
9178b9
9178b9
%install
9178b9
%make_install
9178b9
rm -rf __docs
9178b9
mkdir __docs
9178b9
cp -pR $RPM_BUILD_ROOT%{_docdir}/%{name}/* __docs
9178b9
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
9178b9
find %{buildroot} -type f -name "*.la" -delete
9178b9
9178b9
# fix multilib issues
9178b9
mv %{buildroot}%{_includedir}/sndfile.h \
9178b9
   %{buildroot}%{_includedir}/sndfile-%{__isa_bits}.h
9178b9
9178b9
cat > %{buildroot}%{_includedir}/sndfile.h <
9178b9
#include <bits/wordsize.h>
9178b9
9178b9
#if __WORDSIZE == 32
9178b9
# include "sndfile-32.h"
9178b9
#elif __WORDSIZE == 64
9178b9
# include "sndfile-64.h"
9178b9
#else
9178b9
# error "unexpected value for __WORDSIZE macro"
9178b9
#endif
9178b9
EOF
9178b9
9178b9
%if 0%{?rhel} != 0
9178b9
rm -f %{buildroot}%{_bindir}/sndfile-jackplay
9178b9
%endif
9178b9
9178b9
9178b9
%check
9178b9
LD_LIBRARY_PATH=$PWD/src/.libs make check
9178b9
9178b9
9178b9
%ldconfig_scriptlets
9178b9
9178b9
9178b9
%files
9178b9
%{!?_licensedir:%global license %%doc}
9178b9
%license COPYING
9178b9
%doc AUTHORS README NEWS
9178b9
%{_libdir}/%{name}.so.*
9178b9
9178b9
%files utils
9178b9
%{_bindir}/sndfile-cmp
9178b9
%{_bindir}/sndfile-concat
9178b9
%{_bindir}/sndfile-convert
9178b9
%{_bindir}/sndfile-deinterleave
9178b9
%{_bindir}/sndfile-info
9178b9
%{_bindir}/sndfile-interleave
9178b9
%{_bindir}/sndfile-metadata-get
9178b9
%{_bindir}/sndfile-metadata-set
9178b9
%{_bindir}/sndfile-play
9178b9
%{_bindir}/sndfile-salvage
9178b9
%{_mandir}/man1/sndfile-cmp.1*
9178b9
%{_mandir}/man1/sndfile-concat.1*
9178b9
%{_mandir}/man1/sndfile-convert.1*
9178b9
%{_mandir}/man1/sndfile-deinterleave.1*
9178b9
%{_mandir}/man1/sndfile-info.1*
9178b9
%{_mandir}/man1/sndfile-interleave.1*
9178b9
%{_mandir}/man1/sndfile-metadata-get.1*
9178b9
%{_mandir}/man1/sndfile-metadata-set.1*
9178b9
%{_mandir}/man1/sndfile-play.1*
9178b9
%{_mandir}/man1/sndfile-salvage.1*
9178b9
9178b9
%files devel
9178b9
%doc __docs ChangeLog
9178b9
%{_includedir}/sndfile.h
9178b9
%{_includedir}/sndfile.hh
9178b9
%{_includedir}/sndfile-%{__isa_bits}.h
9178b9
%{_libdir}/%{name}.so
9178b9
%{_libdir}/pkgconfig/sndfile.pc
9178b9
9178b9
9178b9
%changelog
9178b9
* Wed Jan 12 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-7
9178b9
- fix heap buffer overflow in flac (#2030508)
9178b9
9178b9
* Wed Aug 11 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-6
9178b9
- a crafted wav file could cause heap buffer overflow that allowed an arbitrary code execution(#1985029)
9178b9
9178b9
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
9178b9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
9178b9
  Related: rhbz#1991688
9178b9
9178b9
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
9178b9
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
9178b9
9178b9
* Mon Feb 22 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-3
9178b9
- add opus-devel BR to satisfy configure requirements check (#1931251)
9178b9
9178b9
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 1.0.31-2
9178b9
- Use make macros
9178b9
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
9178b9
9178b9
* Wed Jan 27 2021 Michal Hlavinka <mhlavink@redhat.com> - 1.0.31-1
9178b9
- updated to 1.0.31
9178b9
9178b9
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-14
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9178b9
9178b9
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-13
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9178b9
9178b9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-12
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9178b9
9178b9
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-11
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9178b9
9178b9
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-10
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9178b9
9178b9
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-9
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9178b9
9178b9
* Wed Mar 07 2018 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-8
9178b9
- add gcc buildrequire
9178b9
9178b9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-7
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9178b9
9178b9
* Thu Aug 24 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-6
9178b9
- heap-based Buffer Overflow in psf_binheader_writef function (#1483140, CVE-2017-12562)
9178b9
9178b9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-5
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
9178b9
9178b9
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.28-4
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9178b9
9178b9
* Wed Jun 21 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-3
9178b9
- fix buffer overflow in aiff (CVE-2017-6892,rhbz#1463328)
9178b9
9178b9
* Mon Jun 05 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-2
9178b9
- fix flac and pcm buffer overflows (CVE-2017-8361,CVE-2017-8362,CVE-2017-8363,CVE-2017-8365)
9178b9
9178b9
* Tue Apr 11 2017 Michal Hlavinka <mhlavink@redhat.com> - 1.0.28-1
9178b9
- updated to 1.0.28
9178b9
- fix possible buffer overflow when parsing crafted ID3 tags (#1440758, CVE-2017-7586)
9178b9
- fix possible buffer overflow when parsing crafted flac file (#1440756, CVE-2017-7585)
9178b9
9178b9
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.27-2
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9178b9
9178b9
* Fri Nov 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 1.0.27-1
9178b9
- updated to 1.0.27
9178b9
9178b9
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.25-20
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9178b9
9178b9
* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-19
9178b9
- fix incomplete patch for CVE-2015-7805
9178b9
9178b9
* Fri Nov 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-18
9178b9
- fix CVE-2015-7805: Heap overflow vulnerability when parsing specially
9178b9
  crafted AIFF header
9178b9
9178b9
* Thu Aug 27 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.0.25-17
9178b9
- Use __isa_bits macro instead of list of 64-bit architectures
9178b9
9178b9
* Sun Jul 19 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-16
9178b9
- Fix FTBFS
9178b9
- Use %%license
9178b9
9178b9
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-15
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9178b9
9178b9
* Tue Jan 13 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-14
9178b9
- fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840)
9178b9
- division by zero leading to denial of service in psf_fwrite (#1177254)
9178b9
9178b9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-13
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9178b9
9178b9
* Sat Aug 02 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.25-12
9178b9
- Fix up previous commit
9178b9
9178b9
* Sat Aug  2 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.25-11
9178b9
- Modernise spec
9178b9
- Generic 32/64bit platform detection
9178b9
9178b9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-10
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9178b9
9178b9
* Mon Jan 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-9
9178b9
- fix ppc64le build (#1051639)
9178b9
9178b9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-8
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9178b9
9178b9
* Mon Jun 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-7
9178b9
- fix support for aarch64, another part (#969831)
9178b9
9178b9
* Wed Mar 27 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-6
9178b9
- fix support for aarch64 (#925887)
9178b9
9178b9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-5
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9178b9
9178b9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-4
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9178b9
9178b9
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9178b9
9178b9
* Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
9178b9
- Patch to use system libgsm instead of a bundled copy.
9178b9
- Make main package dep in -devel ISA qualified.
9178b9
- Drop -octave Provides (not actually built with octave > 3.0).
9178b9
- Don't build throwaway static lib.
9178b9
- Run test suite during build.
9178b9
9178b9
* Thu Jul 14 2011 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-1
9178b9
- Update to 1.0.25
9178b9
- fixes integer overflow by processing certain PAF audio files (#721240)
9178b9
9178b9
* Sun Mar 27 2011 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.24-1
9178b9
- Update to 1.0.24
9178b9
9178b9
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9178b9
9178b9
* Sat Oct 16 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.23-1
9178b9
- Update to 10.0.23
9178b9
9178b9
* Tue Oct 05 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.22-1
9178b9
- Update to 10.0.22
9178b9
9178b9
* Tue May 11 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.21-1
9178b9
- Update to 10.0.21
9178b9
- Do not include the static library in the package (RHBZ#556074)
9178b9
- Remove BR on jack since sndfile-jackplay is not provided anymore
9178b9
9178b9
* Mon Feb  1 2010 Stepan Kasal <skasal@redhat.com> - 1.0.20-5
9178b9
- Do not build against Jack on RHEL
9178b9
- Fix the Source0: URL
9178b9
- Fix the licence tag
9178b9
9178b9
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-4
9178b9
- Split utils into a subpackage
9178b9
9178b9
* Sat Nov 14 2009 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.20-3
9178b9
- Add FLAC/Ogg/Vorbis support (BR: libvorbis-devel)
9178b9
- Make build verbose
9178b9
- Remove rpath
9178b9
- Fix ChangeLog encoding
9178b9
- Move the big Changelog to the devel package
9178b9
9178b9
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9178b9
9178b9
* Sat Jun 06 2009 Lennart Poettering <lpoetter@redhat.com> - 1.0.20-1
9178b9
- Updated to 1.0.20
9178b9
9178b9
* Tue Mar 03 2009 Robert Scheck <robert@fedoraproject.org> - 1.0.17-8
9178b9
- Rebuilt against libtool 2.2
9178b9
9178b9
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-7
9178b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9178b9
9178b9
* Sat Oct 25 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-6
9178b9
- Removed spurious #endif in the libsndfile.h wrapper. Thx to Edward
9178b9
  Sheldrake for finding it. Fixes #468508.
9178b9
- Fix build for autoconf-2.63
9178b9
9178b9
* Thu Oct 23 2008 Andreas Thienemann <andreas@bawue.net> - 1.0.17-5
9178b9
- Fixed multilib conflict. #342401
9178b9
- Made flac support actually work correctly.
9178b9
9178b9
* Thu Aug  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.17-4
9178b9
- fix license tag
9178b9
9178b9
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.17-3
9178b9
- Autorebuild for GCC 4.3
9178b9
9178b9
* Thu Sep 20 2007 Andreas Thienemann <andreas@bawue.net> - 1.0.17-2
9178b9
- Adding FLAC support to libsndfile courtesy of gentoo, #237575
9178b9
- Fixing CVE-2007-4974. Thanks to the gentoo people for the patch, #296221
9178b9
9178b9
* Fri Sep 08 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.17-1
9178b9
- Updated to 1.0.17
9178b9
9178b9
* Sun Apr 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.16-1
9178b9
- Updated to 1.0.16
9178b9
9178b9
* Thu Mar 30 2006 Andreas Thienemann <andreas@bawue.net> - 1.0.15-1
9178b9
- Updated to 1.0.15
9178b9
9178b9
* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.0.14-1.fc5
9178b9
- Updated to 1.0.14
9178b9
- Dropped patch0
9178b9
9178b9
* Thu May 12 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-3
9178b9
- rebuilt
9178b9
9178b9
* Sat Mar  5 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.11-2
9178b9
- Fix format string bug (#149863).
9178b9
- Drop explicit Epoch 0.
9178b9
9178b9
* Sat Dec  4 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.11-0.fdr.1
9178b9
- Update to 1.0.11.
9178b9
9178b9
* Wed Oct 13 2004 Ville Skyttä <ville.skytta@iki.fi> - 0:1.0.10-0.fdr.1
9178b9
- Update to 1.0.10, update URLs, include ALSA support.
9178b9
- Disable dependency tracking to speed up the build.
9178b9
- Add missing ldconfig invocations.
9178b9
- Make -devel require pkgconfig.
9178b9
- Include developer docs in -devel.
9178b9
- Provide -octave in main package, own more related dirs.
9178b9
- Bring specfile up to date with current spec templates.
9178b9
9178b9
* Sat Apr 12 2003 Dams <anvil[AT]livna.org>
9178b9
- Initial build.