self-build-ffmpeg-vl.spec 11 KB

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