self-build-ffmpeg-vl.spec 12 KB

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