libsndfile-vl.spec 7.5 KB

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