libvpx-vl.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. %global somajor 5
  2. %global sominor 0
  3. %global sotiny 0
  4. %global soversion %{somajor}.%{sominor}.%{sotiny}
  5. Name: libvpx
  6. Version: 1.7.0
  7. Release: 1%{?_dist_release}
  8. Summary: The VP8/VP9 Codec SDK
  9. Summary(ja): VP8/VP9 コーデックソフトウェア開発キット
  10. Group: System Environment/Libraries
  11. License: BSD
  12. URL: http://www.webmproject.org/code/
  13. Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
  14. Source1: vpx_config.h
  15. Source2: libvpx.ver
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  17. %ifarch %{ix86} x86_64
  18. BuildRequires: yasm
  19. %endif
  20. Vendor: Project Vine
  21. Distribution: Vine Linux
  22. Packager: daisuke
  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-experimental --enable-spatial-svc \
  74. --enable-vp9-highbitdepth \
  75. %if ! %{generic_target}
  76. --enable-shared \
  77. %endif
  78. --prefix=%{_prefix} \
  79. --libdir=%{_libdir} \
  80. --disable-install-docs \
  81. --enable-install-srcs \
  82. --size-limit=16384x16384
  83. # fix up optflags
  84. sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk
  85. sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk
  86. sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk
  87. %{__make} %{?_smp_mflags} verbose=true
  88. # Manual shared library creation
  89. # We should never need to do this anymore, and if we do, we need to fix the version-script.
  90. %if %{generic_target}
  91. mkdir tmp
  92. cd tmp
  93. ar x ../libvpx_g.a
  94. cd ..
  95. gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.%{somajor} -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{soversion}
  96. tmp/*.o
  97. rm -rf tmp
  98. %endif
  99. %install
  100. %{__rm} -rf $RPM_BUILD_ROOT
  101. %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} dist
  102. # Simpler to label the dir as %%doc.
  103. if [ -d %{buildroot}/usr/docs ]; then
  104. mv %{buildroot}/usr/docs doc/
  105. fi
  106. # Again, we should never need to do this anymore.
  107. %if %{generic_target}
  108. install -p libvpx.so.%{soversion} %{buildroot}%{_libdir}
  109. pushd %{buildroot}%{_libdir}
  110. ln -sf libvpx.so.%{soversion} libvpx.so
  111. ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}
  112. ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}.%{sominor}
  113. popd
  114. %endif
  115. pushd %{buildroot}
  116. # Stuff we don't need.
  117. rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
  118. # No, bad google. No treat.
  119. mv usr/bin/examples/* usr/bin/
  120. rm -rf usr/bin/examples
  121. # Rename a few examples
  122. mv usr/bin/postproc usr/bin/vp8_postproc
  123. mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
  124. mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
  125. mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
  126. # Fix the binary permissions
  127. chmod 755 usr/bin/*
  128. popd
  129. # Get the vpx_config.h file
  130. %ifarch %{arm}
  131. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-arm.h
  132. %else
  133. # Does ppc64le need its own?
  134. %ifarch ppc64 ppc64le
  135. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-ppc64.h
  136. %else
  137. %ifarch s390 s390x
  138. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-s390.h
  139. %else
  140. %ifarch %{ix86}
  141. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-x86.h
  142. %else
  143. cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h
  144. %endif
  145. %endif
  146. %endif
  147. %endif
  148. cp %{SOURCE1} %{buildroot}%{_includedir}/vpx/vpx_config.h
  149. # for timestamp sync
  150. touch -r AUTHORS %{buildroot}%{_includedir}/vpx/vpx_config.h
  151. mv %{buildroot}%{_prefix}/src/vpx_dsp %{buildroot}%{_includedir}/
  152. mv %{buildroot}%{_prefix}/src/vpx_mem %{buildroot}%{_includedir}/
  153. mv %{buildroot}%{_prefix}/src/vpx_ports %{buildroot}%{_includedir}/
  154. mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/
  155. rm -rf %{buildroot}%{_prefix}/src
  156. %clean
  157. rm -rf $RPM_BUILD_ROOT
  158. %post -p /sbin/ldconfig
  159. %postun -p /sbin/ldconfig
  160. %files
  161. %defattr(-,root,root,-)
  162. %doc AUTHORS LICENSE 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. * Thu Feb 22 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.0-1
  179. - new upstream release.
  180. - updated Source2.
  181. - added Source1.
  182. * Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
  183. - new upstream release
  184. - remove Patch0 (libvpx-0.9.0-no-explicit-dep-on-static-lib.patch)
  185. - remove Source1 (libvpx.pc)
  186. * Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.6-1
  187. - new upstream release
  188. * Mon Dec 27 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1
  189. - new upstream release
  190. * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.1-2
  191. - rebuild with rpm-4.8.1 for pkg-config file
  192. * Sun Jul 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.1-1
  193. - new upstream release
  194. * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
  195. - initial build for Vine Linux