self-build-ffmpeg-vl5.spec 10 KB

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