source: projects/specs/trunk/nonfree/self-build-ffmpeg/self-build-ffmpeg-vl5.spec @ 2162

Revision 2162, 9.7 KB checked in by munepi, 14 years ago (diff)

fix self-build-ffmpeg-vl5.spec

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