libvpx-vl.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. Name: libvpx
  2. Version: 0.9.0
  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: libvpx-0.9.0.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
  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. ./configure \
  64. --target=%{vpxtarget} \
  65. --enable-pic \
  66. --disable-install-docs \
  67. --disable-install-srcs
  68. # fix up optflags
  69. sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk
  70. sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk
  71. sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk
  72. %{__make} %{?_smp_mflags} verbose=true target=libs
  73. mkdir -p tmp
  74. pushd tmp
  75. ar x ../libvpx_g.a
  76. popd
  77. gcc -shared -fPIC -pthread -lm \
  78. -Wl,--no-undefined \
  79. -Wl,-soname,libvpx.so.0 \
  80. -Wl,--version-script,%{SOURCE2} \
  81. -Wl,-z,noexecstack \
  82. -o libvpx.so.0.0.0 tmp/*.o
  83. rm -rf tmp
  84. ln -sf libvpx.so.0.0.0 libvpx.so
  85. mv libvpx.a libvpx.a.tmp
  86. mv libvpx_g.a libvpx_g.a.tmp
  87. make %{?_smp_mflags} verbose=true target=examples
  88. mv libvpx.a.tmp libvpx.a
  89. mv libvpx_g.a.tmp libvpx_g.a
  90. %install
  91. %{__rm} -rf $RPM_BUILD_ROOT
  92. mkdir -p $RPM_BUILD_ROOT%{_prefix}
  93. %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} install
  94. mkdir -p $RPM_BUILD_ROOT%{_libdir}
  95. %{__install} -m755 libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}
  96. ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0
  97. ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so
  98. # Install the pkg-config file
  99. mkdir -p %{buildroot}%{_libdir}/pkgconfig/
  100. install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
  101. # Fill in the variables
  102. sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  103. sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  104. sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
  105. pushd %{buildroot}
  106. # Rename a few examples
  107. mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
  108. mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
  109. mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
  110. # Move the headers into the subdir
  111. mkdir -p usr/include/vpx/
  112. mv usr/include/*.h usr/include/vpx/
  113. # Fix the binary permissions
  114. chmod 755 usr/bin/*
  115. popd
  116. rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt
  117. rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
  118. %clean
  119. rm -rf $RPM_BUILD_ROOT
  120. %post -p /sbin/ldconfig
  121. %postun -p /sbin/ldconfig
  122. %files
  123. %defattr(-,root,root,-)
  124. %doc AUTHORS LICENSE README CHANGELOG
  125. %{_libdir}/*.so.*
  126. %files devel
  127. %defattr(-,root,root,-)
  128. %{_libdir}/*.so
  129. %{_libdir}/pkgconfig/*.pc
  130. %{_includedir}/vpx/*.h
  131. %files utils
  132. %defattr(-,root,root,-)
  133. %{_bindir}/*
  134. %changelog
  135. * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
  136. - initial build for Vine Linux