self-build-ffmpeg-vl.spec 14 KB

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