libsndfile-vl.spec 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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: 2%{?_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. %if %{build_compat32}
  114. %post -n compat32-%{name} -p /sbin/ldconfig
  115. %postun -n compat32-%{name} -p /sbin/ldconfig
  116. %endif
  117. %files
  118. %defattr(-,root,root)
  119. %license COPYING
  120. %doc AUTHORS ChangeLog NEWS README*
  121. %{_libdir}/libsndfile.so.*
  122. %{_bindir}/*
  123. %{_mandir}/man1/*
  124. %files devel
  125. %defattr(-,root,root)
  126. %doc html/*
  127. %{_libdir}/libsndfile.so
  128. %{_includedir}/sndfile.h
  129. %{_includedir}/sndfile.hh
  130. %{_includedir}/sndfile-%{wordsize}.h
  131. %{_libdir}/pkgconfig/sndfile.pc
  132. # compat32
  133. %if %{build_compat32}
  134. %files -n compat32-%{name}
  135. %defattr(-,root,root)
  136. %{_libdir}/libsndfile.so.*
  137. %files -n compat32-%{name}-devel
  138. %defattr(-,root,root)
  139. %{_includedir}/sndfile-%{wordsize}.h
  140. %{_libdir}/libsndfile.so
  141. %{_libdir}/pkgconfig/sndfile.pc
  142. %endif
  143. %changelog
  144. * Sat Oct 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.28-2
  145. - removed a comment in %%postun script.
  146. * Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.28-1
  147. - new upstream release.
  148. - dropped Patch100-101.
  149. - imported Patch100-111 from debian.
  150. * Wed Feb 18 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.0.25-2
  151. - added Patch0, 1 and 101 from Fedora
  152. * Tue Jan 13 2015 Michal Hlavinka <mhlavink@redhat.com> - 1.0.25-14
  153. - fix CVE-2014-9496: 2 buffer overruns in sd2_parse_rsrc_fork (#1178840)
  154. - division by zero leading to denial of service in psf_fwrite (#1177254)
  155. * Sat Nov 12 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.0.25-2
  156. - Patch to use system libgsm instead of a bundled copy.
  157. - added BR: flac-devel, libogg-devel, libvorbis-devel, pkgconfig,
  158. sqlite3-devel and gsm-devel
  159. * Mon Apr 29 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.25-1
  160. - new upstream release
  161. * Sun Jul 31 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 1.0.21-3
  162. - change spec filename (-vl)
  163. * Sat Jul 30 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 1.0.21-2
  164. - add patch100 for fix CVE-2011-2696 (IOF) from debian, thanks.
  165. * Wed Sep 22 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.0.21-1
  166. - new upstream release
  167. - built with rpm-4.8.1-1
  168. * Mon Jun 1 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.20-1vl5
  169. - new upstream release with security fix (CVE-2009-1788, 1791)
  170. - add patch110 to fix devide by 0 issues
  171. - drop patch100 (is included in new release)
  172. - change configure option to fix new release
  173. - revome "TODO" file from file list
  174. * Sun May 10 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.0.17-3
  175. - added compat32 package for x86_64 arch support
  176. * Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.17-2
  177. - spec in utf-8
  178. - remove static lib
  179. * Sat Jul 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.17-1vl5
  180. - applied new versioning policy
  181. - removed lib*.la file from devel package
  182. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.17-0vl2
  183. - rebuild for VineSeed
  184. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.17-0vl1
  185. - new upstream release
  186. * Mon Oct 22 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0.16-0vl3.1
  187. - add patch100 for fix CVE-2007-4974 (PCM Data Handling Buffer Overflow)
  188. - built for VinePlus 4.x
  189. * Fri Nov 17 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.0.16-0vl3
  190. - add BuildRequires: alsa-lib-devel
  191. - add '--disable-sqlite --disable-flac' options to %%configure
  192. * Mon May 01 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.16-0vl2
  193. - rebuilt for VineSeed Plus
  194. * Mon May 01 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.16-0vl1
  195. - new upstream release
  196. - fixed Japanese summary
  197. * Wed Feb 08 2006 Atsushi SHICHI <ats7@a.email.ne.jp> 1.0.13-1vl1
  198. - initial build for VinePlus/3.0
  199. - modified spec file
  200. * Sun May 15 2005 Erik de Castro Lopo <erikd@mega-nerd.com>
  201. - Add html files to the files section.
  202. * Tue Sep 16 2003 Erik de Castro Lopo <erikd@mega-nerd.com>
  203. - Apply corrections from Andrew Schultz.
  204. * Mon Oct 21 2002 Erik de Castro Lopo <erikd@mega-nerd.com>
  205. - Force installation of sndfile.pc file.
  206. * Thu Jul 6 2000 Josh Green <jgreen@users.sourceforge.net>
  207. - Created libsndfile.spec.in
  208. # end of file