%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} Summary: A library to handle various audio file formats. Summary(ja): さまざまなフォーマットの音声ファイルを扱うライブラリ Name: libsndfile Version: 1.0.28 Release: 2%{?_dist_release} Vendor: Project Vine Distribution: Vine Linux License: LGPLv2+ and GPLv2+ and BSD Group: System Environment/Libraries URL: http://www.mega-nerd.com/libsndfile/ Source0: http://www.mega-nerd.com/libsndfile/files/%{name}-%{version}.tar.gz Patch0: %{name}-1.0.25-system-gsm.patch Patch1: libsndfile-1.0.25-zerodivfix.patch # security fix Patch100: CVE-2017-8365.patch Patch101: CVE-2017-8363.patch Patch102: CVE-2017-8362.patch Patch103: CVE-2017-6892.patch Patch104: CVE-2019-3832.patch Patch105: binheader-heapoverflow.patch Patch106: fix_rf64_arm.patch Patch107: fix_typos.patch Patch108: a-ulaw-fix-multiple-buffer-overflows-432.patch Patch109: double64_init-Check-psf-sf.channels-against-upper-bo.patch Patch110: src-wav.c-Fix-heap-read-overflow.patch Patch111: Check-MAX_CHANNELS-in-sndfile-deinterleave.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: alsa-lib-devel BuildRequires: flac-devel BuildRequires: libogg-devel BuildRequires: libvorbis-devel BuildRequires: pkgconfig BuildRequires: sqlite3-devel BuildRequires: gsm-devel %description libsndfile is a C library for reading and writing sound files such as AIFF, AU and WAV files through one standard interface. It can currently read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating point WAV files and a number of compressed formats. %package devel Summary: Libraries, includes, etc to develop libsndfile applications Summary(ja): libsndfile アプリケーションを開発するためのファイル集 Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel Libraries, include files, etc you can use to develop libsndfile applications. # compat32 %package -n compat32-%{name} Summary: A library to handle various audio file formats. Summary(ja): さまざまなフォーマットの音声ファイルを扱うライブラリ Group: System Environment/Libraries %description -n compat32-%{name} libsndfile is a C library for reading and writing sound files such as AIFF, AU and WAV files through one standard interface. It can currently read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating point WAV files and a number of compressed formats. %package -n compat32-%{name}-devel Summary: Libraries, includes, etc to develop libsndfile applications Summary(ja): libsndfile アプリケーションを開発するためのファイル集 Group: Development/Libraries Requires: compat32-%{name} = %{version}-%{release} Requires: compat32-pkgconfig Requires: %{name}-devel = %{version}-%{release} %description -n compat32-%{name}-devel Libraries, include files, etc you can use to develop libsndfile applications. %prep %autosetup -p1 rm -r src/GSM610 ; autoreconf -I M4 -fiv # for system-gsm patch %build %configure \ --disable-dependency-tracking \ --enable-sqlite \ --enable-alsa \ --enable-largefile \ --disable-static # Get rid of rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -rf html cp -pr $RPM_BUILD_ROOT%{_datadir}/doc/libsndfile html rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libsndfile rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la # fix multilib issues %if %{__isa_bits} == 64 %define wordsize 64 %else %define wordsize 32 %endif mv $RPM_BUILD_ROOT%{_includedir}/sndfile.h \ $RPM_BUILD_ROOT%{_includedir}/sndfile-%{wordsize}.h cat > $RPM_BUILD_ROOT%{_includedir}/sndfile.h < #if __WORDSIZE == 32 # include "sndfile-32.h" #elif __WORDSIZE == 64 # include "sndfile-64.h" #else # error "unexpected value for __WORDSIZE macro" #endif EOF %check LD_LIBRARY_PATH=$PWD/src/.libs make check %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %if %{build_compat32} %post -n compat32-%{name} -p /sbin/ldconfig %postun -n compat32-%{name} -p /sbin/ldconfig %endif %files %defattr(-,root,root) %license COPYING %doc AUTHORS ChangeLog NEWS README* %{_libdir}/libsndfile.so.* %{_bindir}/* %{_mandir}/man1/* %files devel %defattr(-,root,root) %doc html/* %{_libdir}/libsndfile.so %{_includedir}/sndfile.h %{_includedir}/sndfile.hh %{_includedir}/sndfile-%{wordsize}.h %{_libdir}/pkgconfig/sndfile.pc # compat32 %if %{build_compat32} %files -n compat32-%{name} %defattr(-,root,root) %{_libdir}/libsndfile.so.* %files -n compat32-%{name}-devel %defattr(-,root,root) %{_includedir}/sndfile-%{wordsize}.h %{_libdir}/libsndfile.so %{_libdir}/pkgconfig/sndfile.pc %endif %changelog * Sat Oct 19 2019 Tomohiro "Tomo-p" KATO - 1.0.28-2 - removed a comment in %%postun script. * Thu Oct 17 2019 Tomohiro "Tomo-p" KATO - 1.0.28-1 - new upstream release. - dropped Patch100-101. - imported Patch100-111 from debian. * Wed Feb 18 2015 Ryoichi INAGAKI - 1.0.25-2 - added Patch0, 1 and 101 from Fedora * Tue Jan 13 2015 Michal Hlavinka - 1.0.25-14 - fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840) - division by zero leading to denial of service in psf_fwrite (#1177254) * Sat Nov 12 2011 Ville Skyttä - 1.0.25-2 - Patch to use system libgsm instead of a bundled copy. - added BR: flac-devel, libogg-devel, libvorbis-devel, pkgconfig, sqlite3-devel and gsm-devel * Mon Apr 29 2013 Toshiharu Kudoh - 1.0.25-1 - new upstream release * Sun Jul 31 2011 Satoshi IWAMOTO - 1.0.21-3 - change spec filename (-vl) * Sat Jul 30 2011 Satoshi IWAMOTO - 1.0.21-2 - add patch100 for fix CVE-2011-2696 (IOF) from debian, thanks. * Wed Sep 22 2010 MATSUBAYASHI Kohji - 1.0.21-1 - new upstream release - built with rpm-4.8.1-1 * Mon Jun 1 2009 Satoshi IWAMOTO 1.0.20-1vl5 - new upstream release with security fix (CVE-2009-1788, 1791) - add patch110 to fix devide by 0 issues - drop patch100 (is included in new release) - change configure option to fix new release - revome "TODO" file from file list * Sun May 10 2009 NAKAMURA Kenta 1.0.17-3 - added compat32 package for x86_64 arch support * Tue Mar 31 2009 Daisuke SUZUKI 1.0.17-2 - spec in utf-8 - remove static lib * Sat Jul 12 2008 Ryoichi INAGAKI 1.0.17-1vl5 - applied new versioning policy - removed lib*.la file from devel package * Mon Oct 22 2007 Satoshi IWAMOTO 1.0.17-0vl2 - rebuild for VineSeed * Mon Oct 22 2007 Satoshi IWAMOTO 1.0.17-0vl1 - new upstream release * Mon Oct 22 2007 Satoshi IWAMOTO 1.0.16-0vl3.1 - add patch100 for fix CVE-2007-4974 (PCM Data Handling Buffer Overflow) - built for VinePlus 4.x * Fri Nov 17 2006 KAZUKI SHIMURA 1.0.16-0vl3 - add BuildRequires: alsa-lib-devel - add '--disable-sqlite --disable-flac' options to %%configure * Mon May 01 2006 Ryoichi INAGAKI 1.0.16-0vl2 - rebuilt for VineSeed Plus * Mon May 01 2006 Ryoichi INAGAKI 1.0.16-0vl1 - new upstream release - fixed Japanese summary * Wed Feb 08 2006 Atsushi SHICHI 1.0.13-1vl1 - initial build for VinePlus/3.0 - modified spec file * Sun May 15 2005 Erik de Castro Lopo - Add html files to the files section. * Tue Sep 16 2003 Erik de Castro Lopo - Apply corrections from Andrew Schultz. * Mon Oct 21 2002 Erik de Castro Lopo - Force installation of sndfile.pc file. * Thu Jul 6 2000 Josh Green - Created libsndfile.spec.in # end of file