self-build-ffmpeg-vl.spec 10 KB

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