self-build-ffmpeg-vl.spec 11 KB

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