self-build-ffmpeg-vl.spec 15 KB

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