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