libvpx-vl.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. Name: libvpx
  2. Version: 0.9.6
  3. Release: 1%{?_dist_release}
  4. Summary: The VP8 Codec SDK
  5. Summary(ja): VP8 コーデックソフトウェア開発キット
  6. Group: System Environment/Libraries
  7. License: BSD
  8. URL: http://www.webmproject.org/tools/vp8-sdk/
  9. Source0: http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
  10. Source1: libvpx.pc
  11. Source2: libvpx.ver
  12. Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  14. %ifarch %{ix86} x86_64
  15. BuildRequires: yasm
  16. %endif
  17. Vendor: Project Vine
  18. Distribution: Vine Linux
  19. Packager: daisuke
  20. %description
  21. The WebM VP8 Codec SDK allows you to integrate your applications with
  22. the VP8 video codec, a high quality, royalty free, open source codec
  23. deployed on millions of computers and devices worldwide.
  24. %description -l ja
  25. WebM VP8 コーデック SDK は、VP8 ビデオコーデックをアプリケーションに
  26. 統合するための開発きっとです。VP8ビデオコーデックは高品質でロイヤリティ
  27. フリーかつオープンソースのコーデックで、世界中の多くのコンピュータや
  28. デバイスで利用されています。
  29. %package devel
  30. Summary: Development files for %{name}
  31. Summary(ja): %{name} の開発ファイル
  32. Group: Development/Libraries
  33. Requires: %{name} = %{version}-%{release}
  34. %description devel
  35. The %{name}-devel package contains development files for
  36. %{name}.
  37. %description devel -l ja
  38. %{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。
  39. %package utils
  40. Summary: example programs for %{name}
  41. Summary(ja): %{name} のサンプルプログラム
  42. Group: Applications/Multimedia
  43. Requires: %{name} = %{version}-%{release}
  44. %description utils
  45. The %{name}-utils package contains example programs that
  46. use %{name}.
  47. %description utils -l ja
  48. %{name}-utils パッケージは、%{name} を使用したサンプル
  49. アプリケーションを含んでいます。
  50. %prep
  51. %setup -q -n %{name}-v%{version}
  52. %patch0 -p1
  53. %build
  54. %ifarch %{ix86}
  55. %global vpxtarget x86-linux-gcc
  56. %else
  57. %ifarch x86_64
  58. %global vpxtarget x86_64-linux-gcc
  59. %else
  60. %global vpxtarget generic-gnu
  61. %endif
  62. %endif
  63. %if "%{vpxtarget}" == "generic-gnu"
  64. %global generic_target 1
  65. %else
  66. %global generic_target 0
  67. %endif
  68. ./configure \
  69. --target=%{vpxtarget} \
  70. --enable-pic \
  71. %if ! %{generic_target}
  72. --enable-shared \
  73. %endif
  74. --prefix=%{_prefix} \
  75. --libdir=%{_libdir} \
  76. --disable-install-docs \
  77. --disable-install-srcs
  78. # fix up optflags
  79. sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk
  80. sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk
  81. sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk
  82. %{__make} %{?_smp_mflags} verbose=true target=libs
  83. %if %{generic_target}
  84. mkdir -p tmp
  85. pushd tmp
  86. ar x ../libvpx_g.a
  87. popd
  88. gcc -shared -fPIC -pthread -lm \
  89. -Wl,--no-undefined \
  90. -Wl,-soname,libvpx.so.0 \
  91. -Wl,--version-script,%{SOURCE2} \
  92. -Wl,-z,noexecstack \
  93. -o libvpx.so.%{version} tmp/*.o
  94. rm -rf tmp
  95. %endif
  96. ln -sf libvpx.so.%{version} libvpx.so
  97. mv libvpx.a libvpx.a.tmp
  98. mv libvpx_g.a libvpx_g.a.tmp
  99. make %{?_smp_mflags} verbose=true target=examples
  100. mv libvpx.a.tmp libvpx.a
  101. mv libvpx_g.a.tmp libvpx_g.a
  102. %install
  103. %{__rm} -rf $RPM_BUILD_ROOT
  104. %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} dist
  105. # Install the pkg-config file
  106. mkdir -p %{buildroot}%{_libdir}/pkgconfig/
  107. install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
  108. # Fill in the variables
  109. sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  110. sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  111. sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  112. %if %{generic_target}
  113. install -p libvpx.so.%{version} %{buildroot}%{_libdir}
  114. pushd %{buildroot}%{_libdir}
  115. ln -sf libvpx.so.%{version} libvpx.so
  116. ln -sf libvpx.so.%{version} libvpx.so.0
  117. ln -sf libvpx.so.%{version} libvpx.so.0.9
  118. popd
  119. %endif
  120. pushd %{buildroot}
  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. rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt
  130. rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
  131. rm -f $RPM_BUILD_ROOT%{_prefix}/{CHANGELOG,README}
  132. rm -rf $RPM_BUILD_ROOT%{_prefix}/build
  133. %clean
  134. rm -rf $RPM_BUILD_ROOT
  135. %post -p /sbin/ldconfig
  136. %postun -p /sbin/ldconfig
  137. %files
  138. %defattr(-,root,root,-)
  139. %doc AUTHORS LICENSE README CHANGELOG
  140. %{_libdir}/*.so.*
  141. %files devel
  142. %defattr(-,root,root,-)
  143. %{_libdir}/*.so
  144. %{_libdir}/pkgconfig/*.pc
  145. %{_includedir}/vpx/*.h
  146. %files utils
  147. %defattr(-,root,root,-)
  148. %{_bindir}/*
  149. %changelog
  150. * Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.6-1
  151. - new upstream release
  152. * Mon Dec 27 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1
  153. - new upstream release
  154. * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.1-2
  155. - rebuild with rpm-4.8.1 for pkg-config file
  156. * Sun Jul 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.1-1
  157. - new upstream release
  158. * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
  159. - initial build for Vine Linux