self-build-ffmpeg-vl.spec 9.7 KB

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