self-build-ffmpeg-vl5.spec 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. %define gpac_postinstall gpac_postinstall_sh=$(mktemp) && \
  2. rpm -q --scripts self-build-gpac | \
  3. /bin/sed -e 's|posttrans[[:blank:]].*|\#!/bin/bash|' > ${gpac_postinstall_sh} && \
  4. /bin/bash ${gpac_postinstall_sh} && /bin/rm -f ${gpac_postinstall_sh}
  5. %define pkgname ffmpeg
  6. %define name self-build-%{pkgname}
  7. %define version 0.5.3
  8. #% define svndate 20090202
  9. %define release 2%{?svndate:.%svndate}%{?_dist_release}
  10. %define sourceurl0 http://ffmpeg.org/releases/%{pkgname}-%{version}.tar.bz2
  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}-vl5.spec
  17. #Source1: %{pkgname}-%{version}.tar.bz2
  18. #Source1: %{pkgname}-%{version}.r%{svnrev}.tar.bz2
  19. #Source2: %{pkgname}-snapshot.sh
  20. Source90: ffmpeg.1.gz
  21. Source91: ffplay.1.gz
  22. Source92: ffserver.1.gz
  23. Source100: %{pkgname}-textrel.patch
  24. Source110: ffmpeg-0.5-disable-texi2html.patch
  25. License: GPLv2+
  26. Group: Restricted Software
  27. Requires(post): self-build-setup >= 0.8
  28. #Requires(post): subversion
  29. # (build)requies of target package.
  30. Requires(post): bzip2-devel
  31. Requires(post): zlib-devel
  32. Requires(post): SDL-devel
  33. Requires(post): imlib2-devel
  34. #Requires(post): texi2html
  35. Requires(post): speex-devel
  36. Requires(post): libogg-devel
  37. Requires(post): libvorbis-devel
  38. #Requires(post): openjpeg-devel
  39. Requires(post): libtheora-devel
  40. Requires(post): gsm-devel
  41. Requires(post): libdc1394-devel
  42. Requires(post): libraw1394-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} \
  120. ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  121. %{__install} -m 644 %{SOURCE100} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  122. %{__install} -m 644 %{SOURCE110} ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
  123. %clean
  124. %{__rm} -rf ${RPM_BUILD_ROOT}
  125. %posttrans
  126. /usr/lib/rpm/self-build-rpm.sh %{name} %{pkgname}-vl5.spec "%{sourceurl0}" 640000
  127. /usr/lib/rpm/pre-allocate-rpm.sh %{pkgname}-%{version}-%{release} \
  128. %{pkgname}-libs-%{version}-%{release} \
  129. %{pkgname}-devel-%{version}-%{release}
  130. ## Rebuild gpac with ffmpeg-devel
  131. # set locale
  132. case $LANG in
  133. ja*)LOCALE=ja ;;
  134. *) LOCALE=C ;;
  135. esac
  136. Rebuild_gpac_C(){
  137. echo -n " "
  138. echo "Rebuild gpac with ffmpeg-devel"
  139. }
  140. Rebuild_gpac_ja(){
  141. echo -n " "
  142. echo "ffmpeg-devel で gpac をリビルドします。"
  143. }
  144. Rebuild_gpac_$LOCALE
  145. %{gpac_postinstall}
  146. %files
  147. %defattr(-,root,root)
  148. %{_datadir}/%{name}
  149. %changelog
  150. * Sat Oct 30 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5.3-2
  151. - collected Source0: tag
  152. * Sat Oct 30 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5.3-1
  153. - new upstream release
  154. * Sat Jul 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5.2-2
  155. - unpacked source archives
  156. * Thu Jun 03 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5.2-1
  157. - new upstream release
  158. * Sun Apr 18 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.5.1-1
  159. - new upstream release
  160. * Sat Jun 06 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-6
  161. - dropped BuildArch: noarch
  162. - added ffmpeg.1, ffplay.1, ffserver.1
  163. * Tue May 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-5
  164. - avoided to execute self-build-rpm.sh on RPM transaction
  165. - moved %%post actions to %%posttrans
  166. * Wed May 13 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-4
  167. - added BuildArch: noarch
  168. - added ffmpeg-0.5-disable-texi2html.patch
  169. - dropped PreReq: texi2html
  170. * Thu Mar 12 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-3
  171. - added %%{gpac_postinstall} in %%post
  172. * Wed Mar 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-2
  173. - corrected release number
  174. * Wed Mar 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.5-1
  175. - new upstream release
  176. - added PreReq:
  177. - speex-devel
  178. - bzip2-devel
  179. * Tue Feb 24 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.7
  180. - change release to sync with ffmpeg
  181. * Sun Feb 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.6
  182. - changed to PreReq: self-build-faad2 >= 2.0 from faad2-devel
  183. * Wed Feb 04 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090202.5
  184. - 20090202 snapshot
  185. * Sun Jan 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-20090110.4
  186. - 20090110 snapshot
  187. - dropped some patches
  188. * Sun Dec 14 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-15488.1
  189. - source updated (r15488)
  190. - fixed License: GPLv2+
  191. - added BuildRequires: gsm-devel libdc1394-devel libraw1394-devel
  192. - added BuildRequires: yasm (only %%ix86)
  193. - applied ffmpeg-cpu.patch (merged from RPM Fusion)
  194. * Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-11662.3vl4
  195. - spec in utf8
  196. * Tue May 20 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.4.9-11662.2vl4
  197. - run pre-allocate-rpm.sh in %%post
  198. - set PreReq: self-build-setup >= 0.8
  199. - change release number
  200. * Wed Apr 16 2008 Atsushi SHICHI <ats777@gmail.com> 0.4.9-11662.1vl4
  201. - add "Source1: %{pkgname}-%{version}.r%{svnrev}.tar.gz",
  202. include Source1 in the binary package.
  203. - drop "Source100: ffmpeg-vine.patch".
  204. - drop "PreReq: subversion".
  205. * Mon Apr 7 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128.1vl4
  206. - build with new versioning policy
  207. - change to use svn export from svn checkout on post install
  208. - fix ffmpeg-vine.patch for libswscale/swscale.c.rej
  209. * Thu Mar 13 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128vl2
  210. - For all pre-required package that is provied by self-build,
  211. changed to its self-build package
  212. * Sun Mar 9 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4.9-0.20080128vl1
  213. - initial build for Vine Linux 4.2
  214. - snapshot 2008/01/28 + some Rev.11662 2008/01/29
  215. ### end of file