self-build-ffmpeg-vl.spec 9.4 KB

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