libsndfile-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. Summary: A library to handle various audio file formats.
  3. Summary(ja): さまざまなフォーマットの音声ファイルを扱うライブラリ
  4. Name: libsndfile
  5. Version: 1.0.28
  6. Release: 1%{?_dist_release}
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: LGPLv2+ and GPLv2+ and BSD
  10. Group: System Environment/Libraries
  11. URL: http://www.mega-nerd.com/libsndfile/
  12. Source0: http://www.mega-nerd.com/libsndfile/files/%{name}-%{version}.tar.gz
  13. Patch0: %{name}-1.0.25-system-gsm.patch
  14. Patch1: libsndfile-1.0.25-zerodivfix.patch
  15. # security fix
  16. Patch100: CVE-2017-8365.patch
  17. Patch101: CVE-2017-8363.patch
  18. Patch102: CVE-2017-8362.patch
  19. Patch103: CVE-2017-6892.patch
  20. Patch104: CVE-2019-3832.patch
  21. Patch105: binheader-heapoverflow.patch
  22. Patch106: fix_rf64_arm.patch
  23. Patch107: fix_typos.patch
  24. Patch108: a-ulaw-fix-multiple-buffer-overflows-432.patch
  25. Patch109: double64_init-Check-psf-sf.channels-against-upper-bo.patch
  26. Patch110: src-wav.c-Fix-heap-read-overflow.patch
  27. Patch111: Check-MAX_CHANNELS-in-sndfile-deinterleave.patch
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  29. BuildRequires: alsa-lib-devel
  30. BuildRequires: flac-devel
  31. BuildRequires: libogg-devel
  32. BuildRequires: libvorbis-devel
  33. BuildRequires: pkgconfig
  34. BuildRequires: sqlite3-devel
  35. BuildRequires: gsm-devel
  36. %description
  37. libsndfile is a C library for reading and writing sound files such as
  38. AIFF, AU and WAV files through one standard interface. It can currently
  39. read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating
  40. point WAV files and a number of compressed formats.
  41. %package devel
  42. Summary: Libraries, includes, etc to develop libsndfile applications
  43. Summary(ja): libsndfile アプリケーションを開発するためのファイル集
  44. Group: Development/Libraries
  45. Requires: %{name} = %{version}-%{release}
  46. Requires: pkgconfig
  47. %description devel
  48. Libraries, include files, etc you can use to develop libsndfile applications.
  49. # compat32
  50. %package -n compat32-%{name}
  51. Summary: A library to handle various audio file formats.
  52. Summary(ja): さまざまなフォーマットの音声ファイルを扱うライブラリ
  53. Group: System Environment/Libraries
  54. %description -n compat32-%{name}
  55. libsndfile is a C library for reading and writing sound files such as
  56. AIFF, AU and WAV files through one standard interface. It can currently
  57. read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating
  58. point WAV files and a number of compressed formats.
  59. %package -n compat32-%{name}-devel
  60. Summary: Libraries, includes, etc to develop libsndfile applications
  61. Summary(ja): libsndfile アプリケーションを開発するためのファイル集
  62. Group: Development/Libraries
  63. Requires: compat32-%{name} = %{version}-%{release}
  64. Requires: compat32-pkgconfig
  65. Requires: %{name}-devel = %{version}-%{release}
  66. %description -n compat32-%{name}-devel
  67. Libraries, include files, etc you can use to develop libsndfile applications.
  68. %prep
  69. %autosetup -p1
  70. rm -r src/GSM610 ; autoreconf -I M4 -fiv # for system-gsm patch
  71. %build
  72. %configure \
  73. --disable-dependency-tracking \
  74. --enable-sqlite \
  75. --enable-alsa \
  76. --enable-largefile \
  77. --disable-static
  78. # Get rid of rpath
  79. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  80. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  81. make %{?_smp_mflags}
  82. %install
  83. rm -rf $RPM_BUILD_ROOT
  84. make install DESTDIR=$RPM_BUILD_ROOT
  85. rm -rf html
  86. cp -pr $RPM_BUILD_ROOT%{_datadir}/doc/libsndfile html
  87. rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libsndfile
  88. rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
  89. # fix multilib issues
  90. %if %{__isa_bits} == 64
  91. %define wordsize 64
  92. %else
  93. %define wordsize 32
  94. %endif
  95. mv $RPM_BUILD_ROOT%{_includedir}/sndfile.h \
  96. $RPM_BUILD_ROOT%{_includedir}/sndfile-%{wordsize}.h
  97. cat > $RPM_BUILD_ROOT%{_includedir}/sndfile.h <<EOF
  98. #include <bits/wordsize.h>
  99. #if __WORDSIZE == 32
  100. # include "sndfile-32.h"
  101. #elif __WORDSIZE == 64
  102. # include "sndfile-64.h"
  103. #else
  104. # error "unexpected value for __WORDSIZE macro"
  105. #endif
  106. EOF
  107. %check
  108. LD_LIBRARY_PATH=$PWD/src/.libs make check
  109. %clean
  110. rm -rf $RPM_BUILD_ROOT
  111. %post -p /sbin/ldconfig
  112. %postun -p /sbin/ldconfig
  113. # compat32
  114. %if %{build_compat32}
  115. %post -n compat32-%{name} -p /sbin/ldconfig
  116. %postun -n compat32-%{name} -p /sbin/ldconfig
  117. %endif
  118. %files
  119. %defattr(-,root,root)
  120. %license COPYING
  121. %doc AUTHORS ChangeLog NEWS README*
  122. %{_libdir}/libsndfile.so.*
  123. %{_bindir}/*
  124. %{_mandir}/man1/*
  125. %files devel
  126. %defattr(-,root,root)
  127. %doc html/*
  128. %{_libdir}/libsndfile.so
  129. %{_includedir}/sndfile.h
  130. %{_includedir}/sndfile.hh
  131. %{_includedir}/sndfile-%{wordsize}.h
  132. %{_libdir}/pkgconfig/sndfile.pc
  133. # compat32
  134. %if %{build_compat32}
  135. %files -n compat32-%{name}
  136. %defattr(-,root,root)
  137. %{_libdir}/libsndfile.so.*
  138. %files -n compat32-%{name}-devel
  139. %defattr(-,root,root)
  140. %{_includedir}/sndfile-%{wordsize}.h
  141. %{_libdir}/libsndfile.so
  142. %{_libdir}/pkgconfig/sndfile.pc
  143. %endif
  144. %changelog
  145. * Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.28-1
  146. - new upstream release.
  147. - dropped Patch100-101.
  148. - imported Patch100-111 from debian.
  149. * Wed Feb 18 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.0.25-2
  150. - added Patch0, 1 and 101 from Fedora
  151. * Tue Jan 13 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-14
  152. - fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840)
  153. - division by zero leading to denial of service in psf_fwrite (#1177254)
  154. * Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
  155. - Patch to use system libgsm instead of a bundled copy.
  156. - added BR: flac-devel, libogg-devel, libvorbis-devel, pkgconfig,
  157. sqlite3-devel and gsm-devel
  158. * Mon Apr 29 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.25-1
  159. - new upstream release
  160. * Sun Jul 31 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 1.0.21-3
  161. - change spec filename (-vl)
  162. * Sat Jul 30 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 1.0.21-2
  163. - add patch100 for fix CVE-2011-2696 (IOF) from debian, thanks.
  164. * Wed Sep 22 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.21-1
  165. - new upstream release
  166. - built with rpm-4.8.1-1
  167. * Mon Jun 1 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.20-1vl5
  168. - new upstream release with security fix (CVE-2009-1788, 1791)
  169. - add patch110 to fix devide by 0 issues
  170. - drop patch100 (is included in new release)
  171. - change configure option to fix new release
  172. - revome "TODO" file from file list
  173. * Sun May 10 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.0.17-3
  174. - added compat32 package for x86_64 arch support
  175. * Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.17-2
  176. - spec in utf-8
  177. - remove static lib
  178. * Sat Jul 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.17-1vl5
  179. - applied new versioning policy
  180. - removed lib*.la file from devel package
  181. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.17-0vl2
  182. - rebuild for VineSeed
  183. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.17-0vl1
  184. - new upstream release
  185. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.16-0vl3.1
  186. - add patch100 for fix CVE-2007-4974 (PCM Data Handling Buffer Overflow)
  187. - built for VinePlus 4.x
  188. * Fri Nov 17 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.0.16-0vl3
  189. - add BuildRequires: alsa-lib-devel
  190. - add '--disable-sqlite --disable-flac' options to %%configure
  191. * Mon May 01 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.16-0vl2
  192. - rebuilt for VineSeed Plus
  193. * Mon May 01 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.16-0vl1
  194. - new upstream release
  195. - fixed Japanese summary
  196. * Wed Feb 08 2006 Atsushi SHICHI <ats7@a.email.ne.jp> 1.0.13-1vl1
  197. - initial build for VinePlus/3.0
  198. - modified spec file
  199. * Sun May 15 2005 Erik de Castro Lopo <erikd@mega-nerd.com>
  200. - Add html files to the files section.
  201. * Tue Sep 16 2003 Erik de Castro Lopo <erikd@mega-nerd.com>
  202. - Apply corrections from Andrew Schultz.
  203. * Mon Oct 21 2002 Erik de Castro Lopo <erikd@mega-nerd.com>
  204. - Force installation of sndfile.pc file.
  205. * Thu Jul 6 2000 Josh Green <jgreen@users.sourceforge.net>
  206. - Created libsndfile.spec.in
  207. # end of file