libvpx-vl.spec 6.3 KB

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