self-build-ffmpeg-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. %define gpac_postinstall \
  2. gpac_postinstall_sh=$(mktemp) && \
  3. rpm -q --scripts self-build-gpac | \
  4. /bin/sed -e 's|posttrans[[:blank:]].*|\#!/bin/bash|' > ${gpac_postinstall_sh} && \
  5. /bin/bash ${gpac_postinstall_sh} && /bin/rm -f ${gpac_postinstall_sh}
  6. %define pkgname ffmpeg
  7. %define name self-build-%{pkgname}
  8. %define version 0.6.3
  9. #% define svndate 20110326
  10. %define release 3%{?svndate:.%svndate}%{?_dist_release}
  11. %define sourceurl0 http://ffmpeg.org/releases/%{pkgname}-%{version}.tar.bz2
  12. ## available for v0.6 or lower
  13. %define with_libfaad 1
  14. %define with_faac 1
  15. %define with_vaapi 1
  16. %define with_libvpx 1
  17. Summary: Package to automatically build %{pkgname} rpm package
  18. Summary(ja): %{pkgname} の rpm パッケージを自動作成するパッケージ
  19. Name: %{name}
  20. Version: %{version}
  21. Release: %{release}
  22. Source0: %{pkgname}-vl6.spec
  23. #Source1: %{pkgname}-%{?svndate:%svndate}%{!?svndate:%version}.tar.bz2
  24. Source2: %{pkgname}-snapshot.sh
  25. Source90: ffmpeg.1.gz
  26. Source91: ffplay.1.gz
  27. Source92: ffserver.1.gz
  28. Source93: ffprobe.1.gz
  29. # CVE-2011-3362
  30. # from http://git.videolan.org/?p=ffmpeg.git;a=patch;h=91d5da9321c52e8197fb14046ebb335f3e6ff4a0;hp=08ddfb77a1aff378345026ba49fea9fb93ff1e70
  31. Source101: ffmpeg-0.6.3-CVE-2011-3362.patch
  32. # CVE-2011-3973, CVE-2011-3974
  33. # from http://git.videolan.org/?p=ffmpeg.git;a=patch;h=bd968d260aef322fb32e254a3de0d2036c57bd56;hp=00c5cf4beb0e45e936544a5766b56e241ae03234
  34. Source102: ffmpeg-0.6.3-CVE-2011-3974.patch
  35. License: GPLv2+
  36. Group: Restricted Software
  37. Requires(post): self-build-setup >= 0.9.9
  38. #Requires(post): subversion
  39. # (build)requies of target package.
  40. Requires(post): bzip2-devel
  41. Requires(post): gsm-devel
  42. Requires(post): imlib2-devel
  43. Requires(post): libdc1394-devel
  44. Requires(post): libraw1394-devel
  45. Requires(post): librtmp-devel >= 2.3
  46. Requires(post): libtheora-devel
  47. %{?with_vaapi:Requires(post): libva-devel >= 0.31.0}
  48. Requires(post): libvdpau-devel
  49. Requires(post): libvorbis-devel
  50. %{?with_libvpx:Requires(post): libvpx-devel >= 0.9.1}
  51. %{?_with_opencore_amr:Requires(post): opencore-amr-devel}
  52. ##Requires(post): openjpeg-devel
  53. ##Requires(post): schroedinger-devel
  54. Requires(post): SDL-devel
  55. Requires(post): speex-devel
  56. ##Requires(post): texi2html
  57. Requires(post): zlib-devel
  58. Requires(post): libogg-devel
  59. Requires(post): yasm
  60. Requires(post): self-build-a52dec
  61. Requires(post): self-build-faac
  62. Requires(post): self-build-faad2
  63. Requires(post): self-build-lame
  64. Requires(post): self-build-libdca
  65. Requires(post): self-build-x264 >= 0.0.0-15.20110322
  66. Requires(post): self-build-xvidcore
  67. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  68. BuildArch: noarch
  69. Packager: munepi
  70. %description
  71. FFMpeg is a complete and free Internet live audio and video
  72. broadcasting solution for Linux/Unix. It also includes a
  73. digital VCR. It can encode in real time in many formats
  74. including MPEG1 audio and video, MPEG4, h263, ac3, asf, avi,
  75. real, mjpeg, and flash.
  76. If you install this package, it automaticaly downloads source
  77. code ,compile it, and create rpm packages of %{pkgname}-%{version}.
  78. And the created rpm packages are automatically installed
  79. if installation is executed by apt-get command or synaptic
  80. package manager.
  81. [Note]
  82. This package requires many other packages to compile
  83. target software. So it consume more disk space than usual.
  84. Also installation takes longer time because of compilation.
  85. (This will take a few minutes to quarter or half of an hour,
  86. depends on building environment)
  87. [About self-build package]
  88. For some kind of software, distributing of binary package
  89. may viorate the patent or law. Therefore we chose self-build
  90. packge, create binary package on your machine, for such kind
  91. of softwares instead of distributing binary package.
  92. Please obey the national law when you use the created binary
  93. packages. And if you want to use the softwares using patented
  94. thechnology, it may be required to get a permission, make an
  95. agreement or purchas a license. Please consider it with your
  96. purpose or way of use and take appropriate action.
  97. %description -l ja
  98. FFMpeg は Linux/Unix に対する完全にフリーなインターネットライ
  99. ブオーティオ・ビデオブロードキャスティングソリューションです.
  100. またデジタル VCR を含んでいます.MPEG1 オーディオ・ビデオ,
  101. MPEG4, h263, ac3, asf, avi, real, mjpeg, flash を含む
  102. 多様なフォーマットをリアルタイムにエンコードすることができます.
  103. このパッケージをインストールすると、自動的にソースコードを
  104. ダウンロードしてコンパイルし、%{pkgname}-%{version}
  105. の rpm パッケージを作成します。
  106. また apt-get コマンドや synaptic パッケージマネージャから実行
  107. した場合は、作成された rpm パッケージのインストールも自動的に
  108. 行います。
  109. [注意]
  110. コンパイルに必要な多くの関連パッケージを要求するので通常より
  111. ディスクの領域を多く消費します。
  112. またインストール時にコンパイルを行うため、通常より時間がかか
  113. る場合があります。(環境にもよりますが数分から数十分程度)
  114. [self-build パッケージについて]
  115. ソフトウェアによってはバイナリパッケージの配布が特許や法律に
  116. 違反する可能性があるものがあります。その為、このような問題が
  117. 懸念されるソフトウェアについてはバイナリパッケージを直接配布
  118. せずに、ユーザの環境でバイナリを作成する self-build パッケー
  119. ジという方法を採っています。
  120. 作成されたバイナリパッケージの利用にあたっては、各ソフトウェ
  121. アのライセンス、および利用する国の各種法令に従ってください。
  122. また特許に関連するソフトウェアの場合、利用許諾や契約、ライ
  123. センスの購入などが必要となる場合がありますので、利用する目的
  124. や形態に応じて各自で判断し適切な対応を取ってください。
  125. %prep
  126. [ "%{version}-%{release}" != $(rpm -q --queryformat "%%{version}-%%{release}\n" --specfile %{SOURCE0} | tail -1) ] && exit 1
  127. %install
  128. %{__rm} -rf ${RPM_BUILD_ROOT}
  129. %{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  130. %{__install} -m 644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  131. #%{__install} -p -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  132. #%{__install} -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  133. %{__install} -m 644 %{SOURCE90} %{SOURCE91} %{SOURCE92} %{SOURCE93} \
  134. %{SOURCE101} %{SOURCE102} \
  135. ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  136. %clean
  137. %{__rm} -rf ${RPM_BUILD_ROOT}
  138. %posttrans
  139. #/usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl.spec 77000
  140. /usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl6.spec "%{sourceurl0}" 77000
  141. /usr/lib/rpm/pre-allocate-rpm.sh %{pkgname}-%{version}-%{release} \
  142. %{pkgname}-libs-%{version}-%{release} \
  143. %{pkgname}-devel-%{version}-%{release}
  144. ## Rebuild gpac with ffmpeg-devel
  145. # set locale
  146. case $LANG in
  147. ja*)LOCALE=ja ;;
  148. *) LOCALE=C ;;
  149. esac
  150. Rebuild_gpac_C(){
  151. echo -n " "
  152. echo "Rebuild gpac with ffmpeg-devel"
  153. }
  154. Rebuild_gpac_ja(){
  155. echo -n " "
  156. echo "ffmpeg-devel で gpac をリビルドします。"
  157. }
  158. Rebuild_gpac_$LOCALE
  159. %{gpac_postinstall}
  160. %files
  161. %defattr(-,root,root)
  162. %{_datadir}/%{name}
  163. %changelog
  164. * Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.3-3
  165. - applied two patches for CVE-2011-3973, CVE-2011-3974, CVE-2011-3362
  166. from git.videolan.org
  167. * Mon Sep 12 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.3-2
  168. - added BuildArch: noarch
  169. * Sun May 01 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.3-1
  170. - new upstream release
  171. * Tue Apr 05 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.2-1
  172. - new upstream release
  173. * Sat Mar 26 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.1-2
  174. - required latest x264 build
  175. - added BuildRequires: librtmp-devel >= 2.3
  176. * Sat Oct 30 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6.1-1
  177. - new upstream release
  178. * Sat Jul 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6-4
  179. - unpacked source archives
  180. * Sun Jul 11 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6-3
  181. - fixed some dependencies
  182. - Requires(post): libva-devel
  183. - Requires(post): libvpx-devel >= 0.9.1
  184. * Sat Jun 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6-2
  185. - new upstream release
  186. * Sun Apr 18 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.6-1.20100410
  187. - bumped version to pre-0.6
  188. - updated source snapshot 20100410
  189. * Sat Apr 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5-12.20100401
  190. - fixed self-build log size
  191. * Sat Apr 10 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5-11.20100401
  192. - added ffprobe.1.gz
  193. * Fri Apr 02 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5-10.20100401
  194. - updated source snapshot 20100401
  195. * Sat Mar 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5-8.20100216
  196. - renamed %%{Source0} to ffmpeg-vl.spec
  197. * Wed Feb 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5-7.20100216
  198. - updated source snapshot 20100216
  199. - rebuild with recent x264-devel
  200. - updated pre-built man files: ffmpeg.1 ffplay.1 ffserver.1
  201. - added BuildRequires: libvdpau-devel
  202. * Sat Jun 06 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-6
  203. - dropped BuildArch: noarch
  204. - added ffmpeg.1, ffplay.1, ffserver.1
  205. * Tue May 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-5
  206. - avoided to execute self-build-rpm.sh on RPM transaction
  207. - moved %%post actions to %%posttrans
  208. * Wed May 13 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-4
  209. - added BuildArch: noarch
  210. - added ffmpeg-0.5-disable-texi2html.patch
  211. - dropped PreReq: texi2html
  212. * Thu Mar 12 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-3
  213. - added %%{gpac_postinstall} in %%post
  214. * Wed Mar 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-2
  215. - corrected release number
  216. * Wed Mar 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-1
  217. - new upstream release
  218. - added PreReq:
  219. - speex-devel
  220. - bzip2-devel
  221. * Tue Feb 24 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.7
  222. - change release to sync with ffmpeg
  223. * Sun Feb 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.6
  224. - changed to PreReq: self-build-faad2 >= 2.0 from faad2-devel
  225. * Wed Feb 04 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.5
  226. - 20090202 snapshot
  227. * Sun Jan 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090110.4
  228. - 20090110 snapshot
  229. - dropped some patches
  230. * Sun Dec 14 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-15488.1
  231. - source updated (r15488)
  232. - fixed License: GPLv2+
  233. - added BuildRequires: gsm-devel libdc1394-devel libraw1394-devel
  234. - added BuildRequires: yasm (only %%ix86)
  235. - applied ffmpeg-cpu.patch (merged from RPM Fusion)
  236. * Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-11662.3vl4
  237. - spec in utf8
  238. * Tue May 20 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.4.9-11662.2vl4
  239. - run pre-allocate-rpm.sh in %%post
  240. - set PreReq: self-build-setup >= 0.8
  241. - change release number
  242. * Wed Apr 16 2008 Atsushi SHICHI <ats777@gmail.com> 0.4.9-11662.1vl4
  243. - add "Source1: %{pkgname}-%{version}.r%{svnrev}.tar.gz",
  244. include Source1 in the binary package.
  245. - drop "Source100: ffmpeg-vine.patch".
  246. - drop "PreReq: subversion".
  247. * Mon Apr 7 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128.1vl4
  248. - build with new versioning policy
  249. - change to use svn export from svn checkout on post install
  250. - fix ffmpeg-vine.patch for libswscale/swscale.c.rej
  251. * Thu Mar 13 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128vl2
  252. - For all pre-required package that is provied by self-build,
  253. changed to its self-build package
  254. * Sun Mar 9 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128vl1
  255. - initial build for Vine Linux 4.2
  256. - snapshot 2008/01/28 + some Rev.11662 2008/01/29
  257. ### end of file