libvpx-vl.spec 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. %global somajor 6
  2. %global sominor 3
  3. %global sotiny 0
  4. %global soversion %{somajor}.%{sominor}.%{sotiny}
  5. Name: libvpx
  6. Version: 1.10.0
  7. Release: 1%{?_dist_release}
  8. Summary: The VP8/VP9 Codec SDK
  9. Summary(ja): VP8/VP9 コーデックソフトウェア開発キット
  10. Group: system
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Packager: daisuke
  14. License: BSD
  15. URL: https://www.webmproject.org/code/
  16. Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
  17. Source1: vpx_config.h
  18. Source2: libvpx.ver
  19. # Do not disable FORTIFY_SOURCE=2
  20. Patch0: libvpx-1.7.0-leave-fortify-source-on.patch
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  22. %ifarch %{ix86} x86_64
  23. BuildRequires: yasm
  24. %endif
  25. %description
  26. The WebM VP8/VP9 Codec SDK allows you to integrate your applications with
  27. the VP8/VP9 video codec, a high quality, royalty free, open source codec
  28. deployed on millions of computers and devices worldwide.
  29. %description -l ja
  30. WebM VP8/VP9 コーデック SDK は、VP8/VP9 ビデオコーデックをアプリケーションに
  31. 統合するための開発キットです。VP8/VP9ビデオコーデックは高品質でロイヤリティフリー
  32. かつオープンソースのコーデックで、世界中の多くのコンピュータやデバイスで利用されて
  33. います。
  34. %package devel
  35. Summary: Development files for %{name}
  36. Summary(ja): %{name} の開発ファイル
  37. Group: programming
  38. Requires: %{name} = %{version}-%{release}
  39. %description devel
  40. The %{name}-devel package contains development files for
  41. %{name}.
  42. %description devel -l ja
  43. %{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。
  44. %package utils
  45. Summary: example programs for %{name}
  46. Summary(ja): %{name} のサンプルプログラム
  47. Group: multimedia
  48. Requires: %{name} = %{version}-%{release}
  49. %description utils
  50. The %{name}-utils package contains example programs that
  51. use %{name}.
  52. %description utils -l ja
  53. %{name}-utils パッケージは、%{name} を使用したサンプル
  54. アプリケーションを含んでいます。
  55. %debug_package
  56. %prep
  57. %setup -q
  58. %patch0 -p1 -b .leave-fs-on
  59. %build
  60. %ifarch %{ix86}
  61. %global vpxtarget x86-linux-gcc
  62. %else
  63. %ifarch x86_64
  64. %global vpxtarget x86_64-linux-gcc
  65. %else
  66. %global vpxtarget generic-gnu
  67. %endif
  68. %endif
  69. %if "%{vpxtarget}" == "generic-gnu"
  70. %global generic_target 1
  71. %else
  72. %global generic_target 0
  73. %endif
  74. ./configure \
  75. --target=%{vpxtarget} \
  76. --enable-pic \
  77. --enable-vp9-decoder --enable-vp9-encoder \
  78. --enable-experimental \
  79. --enable-vp9-highbitdepth \
  80. %if ! %{generic_target}
  81. --enable-shared \
  82. %endif
  83. --prefix=%{_prefix} \
  84. --libdir=%{_libdir} \
  85. --disable-install-docs \
  86. --enable-install-srcs \
  87. --size-limit=16384x16384
  88. %{__make} %{?_smp_mflags} verbose=true
  89. # Manual shared library creation
  90. # We should never need to do this anymore, and if we do, we need to fix the version-script.
  91. %if %{generic_target}
  92. mkdir tmp
  93. cd tmp
  94. ar x ../libvpx_g.a
  95. cd ..
  96. gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.%{somajor} -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{soversion}
  97. tmp/*.o
  98. rm -rf tmp
  99. %endif
  100. %install
  101. %{__rm} -rf $RPM_BUILD_ROOT
  102. %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} dist
  103. # Simpler to label the dir as %%doc.
  104. if [ -d %{buildroot}/usr/docs ]; then
  105. mv %{buildroot}/usr/docs doc/
  106. fi
  107. # Again, we should never need to do this anymore.
  108. %if %{generic_target}
  109. install -p libvpx.so.%{soversion} %{buildroot}%{_libdir}
  110. pushd %{buildroot}%{_libdir}
  111. ln -sf libvpx.so.%{soversion} libvpx.so
  112. ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}
  113. ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}.%{sominor}
  114. popd
  115. %endif
  116. pushd %{buildroot}
  117. # Stuff we don't need.
  118. rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
  119. # No, bad google. No treat.
  120. mv usr/bin/examples/* usr/bin/
  121. rm -rf usr/bin/examples
  122. # Rename a few examples
  123. mv usr/bin/postproc usr/bin/vp8_postproc
  124. mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
  125. mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
  126. mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
  127. # Fix the binary permissions
  128. chmod 755 usr/bin/*
  129. popd
  130. # Get the vpx_config.h file
  131. %ifarch %{arm}
  132. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-arm.h
  133. %else
  134. # Does ppc64le need its own?
  135. %ifarch ppc64 ppc64le
  136. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-ppc64.h
  137. %else
  138. %ifarch s390 s390x
  139. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-s390.h
  140. %else
  141. %ifarch %{ix86}
  142. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-x86.h
  143. %else
  144. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h
  145. %endif
  146. %endif
  147. %endif
  148. %endif
  149. cp %{SOURCE1} %{buildroot}%{_includedir}/vpx/vpx_config.h
  150. # for timestamp sync
  151. touch -r AUTHORS %{buildroot}%{_includedir}/vpx/vpx_config.h
  152. mv %{buildroot}%{_prefix}/src/vpx_dsp %{buildroot}%{_includedir}/
  153. mv %{buildroot}%{_prefix}/src/vpx_mem %{buildroot}%{_includedir}/
  154. mv %{buildroot}%{_prefix}/src/vpx_ports %{buildroot}%{_includedir}/
  155. mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/
  156. rm -rf %{buildroot}%{_prefix}/src
  157. %clean
  158. rm -rf $RPM_BUILD_ROOT
  159. %files
  160. %defattr(-,root,root,-)
  161. %license LICENSE
  162. %doc AUTHORS README CHANGELOG
  163. %{_libdir}/*.so.*
  164. %files devel
  165. %defattr(-,root,root,-)
  166. %doc docs/html/
  167. %{_includedir}/vpx/
  168. %{_includedir}/vpx_dsp/
  169. %{_includedir}/vpx_mem/
  170. %{_includedir}/vpx_ports/
  171. %{_includedir}/vpx_scale/
  172. %{_libdir}/pkgconfig/vpx.pc
  173. %{_libdir}/libvpx.so
  174. %files utils
  175. %defattr(-,root,root,-)
  176. %{_bindir}/*
  177. %changelog
  178. * Fri Apr 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.10.0-1
  179. - new upstream release.
  180. - dropped ldconfig scriptlets.
  181. - imported Patch0 from rawhide.
  182. * Fri Apr 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.2-1
  183. - new upstream release.
  184. * Thu Feb 22 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.0-1
  185. - new upstream release.
  186. - updated Source2.
  187. - added Source1.
  188. * Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
  189. - new upstream release
  190. - remove Patch0 (libvpx-0.9.0-no-explicit-dep-on-static-lib.patch)
  191. - remove Source1 (libvpx.pc)
  192. * Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.6-1
  193. - new upstream release
  194. * Mon Dec 27 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1
  195. - new upstream release
  196. * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.1-2
  197. - rebuild with rpm-4.8.1 for pkg-config file
  198. * Sun Jul 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.1-1
  199. - new upstream release
  200. * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
  201. - initial build for Vine Linux