]> git.pld-linux.org Git - packages/mplayer.git/blob - mplayer.spec
- changed to ftp2
[packages/mplayer.git] / mplayer.spec
1 #
2 # TODO:
3 # - use external lrmi and few other libs:
4 #   http://www.gocyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm
5 #
6 # Conditional build:
7 %bcond_with     directfb        # with DirectFB video output
8 %bcond_with     divx4linux      # with divx4linux a/v support (binaries, instead
9                                 #  of included OpenDivx)
10
11 %bcond_with     dxr3            # enable use of DXR3/H+ hardware MPEG decoder
12 %bcond_with     ggi             # with ggi video output
13 %bcond_with     live            # enable use of live.com libraries
14 %bcond_with     nas             # with NAS audio output
15 %bcond_with     svga            # with svgalib video output
16 %bcond_with     osd             # with osd menu support
17
18 %bcond_with     altivec         # with altivec support (won't run w/o altivec
19                                 # due to instruction used in CPU detection(?))
20
21 %bcond_with     xmms            # with XMMS inputplugin support
22
23 %bcond_without  aalib           # without aalib video output
24 %bcond_without  jack            # without JACKD support
25 %bcond_without  alsa            # without ALSA audio output
26 %bcond_without  arts            # without arts audio output
27 %bcond_without  caca            # without libcaca video output
28 %bcond_without  dshow           # disable DirectShow support
29 %bcond_without  gui             # without GTK+ GUI
30 %bcond_without  joystick        # disable joystick support
31 %bcond_without  libdv           # disable libdv en/decoding support
32 %bcond_without  lirc            # without lirc support
33 %bcond_without  mad             # without mad (audio MPEG) support
34 %bcond_without  polyp           # without polyp audio output
35 %bcond_without  quicktime       # without binary quicktime dll support
36 %bcond_without  real            # without Real* 8/9 codecs support
37 %bcond_without  runtime         # disable runtime cpu detection, just detect CPU
38                                 #  in compile time (advertised by mplayer
39                                 #  authors as working faster); in this case
40                                 #  mplayer may not work on machine other then
41                                 #  where it was compiled
42 %bcond_without  select          # disable audio select() support (for example
43                                 # required this option ALSA or Vortex2 driver)
44 %bcond_without  smb             # disable Samba (SMB) input support
45 %bcond_without  theora          # without theora support
46 %bcond_without  win32           # without win32 codecs support
47 %bcond_without  vorbis          # without Ogg-Vorbis audio support
48 %bcond_without  mencoder        # disable mencoder (a/v encoder) compilation
49 %bcond_without  libdts          # disable libdts support
50
51 %bcond_with     gtk2            # EXPERIMENTAL support for GTK+ version 2
52 %bcond_with     xlibs
53
54 %ifnarch %{ix86}
55 %undefine       with_win32
56 %undefine       with_quicktime
57 %endif
58
59 # set it to 0, or 1
60 %define         snapshot        0
61
62 %define         sname           MPlayer
63 %define         snap            %{nil}
64
65 %define         pre             pre7
66
67 Summary:        Yet another movie player
68 Summary(es):    Otro reproductor de películas
69 Summary(ko):    ¸®´ª½º¿ë ¹Ìµð¾îÇ÷¹À̾î
70 Summary(pl):    Jeszcze jeden odtwarzacz filmów
71 Summary(pt_BR): Reprodutor de filmes
72 Name:           mplayer
73 Version:        1.0
74 Release:        1.%{pre}.3
75 Epoch:          2
76 License:        GPL
77 Group:          X11/Applications/Multimedia
78 %if %{snapshot}
79 #Source0:       ftp://ftp1.mplayerhq.hu/MPlayer/cvs/%{sname}-%{snap}.tar.bz2
80 #Source0:       %{name}-%{snap}.tar.bz2
81 #Source1:       libavcodec-%{snap}.tar.bz2
82 %else
83 Source0:        ftp://ftp2.mplayerhq.hu/MPlayer/releases/%{sname}-%{version}%{pre}.tar.bz2
84 # Source0-md5:  5fadd6957d3aab989cd760ff38fb8fdf
85 %endif
86 Source3:        ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
87 # Source3-md5:  7b47904a925cf58ea546ca15f3df160c
88 Source4:        ftp://ftp2.mplayerhq.hu/MPlayer/Skin/Blue-1.4.tar.bz2
89 # Source4-md5:  05dd8e4f11a715c9e5d2abf1cdeb907c
90 Source5:        g%{name}.desktop
91 Source6:        ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
92 # Source6-md5:  1ecd31d17b51f16332b1fcc7da36b312
93 Source7:        %{name}.png
94 Source8:        %{name}.desktop
95 Patch0:         %{name}-no_libnsl.patch
96 Patch1:         %{name}-cp1250-fontdesc.patch
97 Patch2:         %{name}-codec.patch
98 Patch3:         %{name}-home_etc.patch
99 Patch4:         %{name}-350.patch
100 Patch5:         %{name}-configure.patch
101 Patch6:         %{name}-gtk+2.patch
102 Patch7:         %{name}-alpha.patch
103 Patch8:         %{name}-altivec.patch
104 Patch9:         %{name}-assembly.patch
105 Patch10:        %{name}-pcmsplit.patch
106 Patch11:        %{name}-bio2jack.patch
107 Patch12:        %{name}-x86_64-detection.patch
108 URL:            http://www.mplayerhq.hu/
109 %{?with_directfb:BuildRequires: DirectFB-devel}
110 BuildRequires:  OpenGL-devel
111 BuildRequires:  SDL-devel >= 1.1.7
112 %if %{with xlibs}
113 BuildRequires:  libXv-devel
114 %else
115 BuildRequires:  XFree86-devel >= 4.0.2
116 %endif
117 %{?with_aalib:BuildRequires:    aalib-devel}
118 %{?with_alsa:BuildRequires:     alsa-lib-devel}
119 %{?with_arts:BuildRequires:     artsc-devel}
120 BuildRequires:  audiofile-devel
121 BuildRequires:  cdparanoia-III-devel
122 %{?with_divx4linux:BuildRequires:       divx4linux-devel >= 1:5.01.20020418}
123 BuildRequires:  docbook-style-xsl
124 %{?with_dxr3:BuildRequires:     em8300-devel}
125 BuildRequires:  enca-devel
126 BuildRequires:  esound-devel
127 BuildRequires:  faad2-devel >= 2.0
128 BuildRequires:  freetype-devel
129 %ifarch ppc
130 %{?with_altivec:BuildRequires:  gcc >= 5:3.3.2-3}
131 %endif
132 %if %{with gui}
133 BuildRequires:  gtk+%{?with_gtk2:2}-devel
134 %endif
135 BuildRequires:  lame-libs-devel
136 %{?with_jack:BuildRequires:     libbio2jack-devel}
137 %{?with_caca:BuildRequires:     libcaca-devel}
138 %{?with_libdts:BuildRequires:   libdts-devel}
139 %{?with_libdv:BuildRequires:    libdv-devel}
140 %{?with_ggi:BuildRequires:      libggi-devel}
141 BuildRequires:  libjpeg-devel
142 %{?with_mad:BuildRequires:      libmad-devel}
143 BuildRequires:  libpng-devel
144 %{?with_smb:BuildRequires:      libsmbclient-devel}
145 %{?with_dshow:BuildRequires:    libstdc++-devel}
146 %{?with_theora:BuildRequires:   libtheora-devel}
147 %{?with_vorbis:BuildRequires:   libvorbis-devel}
148 BuildRequires:  libungif-devel
149 BuildRequires:  libxslt-progs
150 %{?with_lirc:BuildRequires:     lirc-devel}
151 %{?with_live:BuildRequires:     live}
152 BuildRequires:  lzo-devel
153 %{?with_nas:BuildRequires:      nas-devel}
154 BuildRequires:  ncurses-devel
155 %{?with_polyp:BuildRequires:    polypaudio-devel}
156 %{?with_svga:BuildRequires:     svgalib-devel}
157 %{?with_xmms:BuildRequires:     xmms-libs}
158 BuildRequires:  xvid-devel >= 1:0.9.0
159 BuildRequires:  zlib-devel
160 Requires(post,postun):  /sbin/ldconfig
161 Requires:       OpenGL
162 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
163
164 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
165 %define         specflags       -fomit-frame-pointer
166 %define         specflags_alpha -mmax
167 %if %{with altivec}
168 %define         specflags_ppc   -maltivec -mabi=altivec
169 %endif
170
171 %description
172 Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
173 AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
174 MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
175 MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
176 devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
177 optionally with SHM extension, X11 using overlays with the Xvideo
178 extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
179 Voodoo2/3 hardware, SDL v1.1.7 driver etc.
180
181 If you want to use win32 codecs install w32codec package.
182
183 %description -l es
184 Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
185 MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
186 (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
187 de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
188 Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
189 G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
190 overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
191 G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
192 v1.1.7 etc.
193
194 Si quiere usar codecs Win32, instale el paquete w32codec.
195
196 %description -l ko
197 MPlayer´Â ¸®´ª½º¿ë ¹«ºñÇ÷¹À̾îÀÔ´Ï´Ù. ´ëºÎºÐÀÇ mpeg, avi ±×¸®°í asf
198 ÆÄÀÏÀ» Àç»ýÇÕ´Ï´Ù. VCD, DVD, ½É Áö¾î DivX±îÁö º¼ ¼ö ÀÖ½À´Ï´Ù.
199 MPlayerÀÇ ¶Ç ´Ù¸¥ Å« Æ¯Â¡Àº Ãâ·Â µå¶óÀ̹ö°¡ ´Ù¾çÇϴٴ °ÍÀÔ´Ï´Ù. X11,
200 Xv, DGA, OpenGL, SVGAlib, fbdev¿Í ÀÛµ¿Çϸç, SDLÀ̳ª
201 (Matrox/3dfx/SisµîÀÇ) Æ¯Á¤ Ä«µå¿¡ Á¾¼ÓµÈ ·Î¿ì·¹ º§ µå¶óÀ̹öµéµµ »ç¿ëÇÒ
202 ¼ö ÀÖ½À´Ï´Ù. ´ëºÎºÐÀÇ Ãâ·Â µå¶óÀ̹öµéÀº ¼ÒÇÁÆ®¿þ¾î È¤Àº Çϵå¿þ¾îÀûÀÎ
203 Å©±âÁ¶Àý (scaling)À» Áö¿øÇϹǷÎ, Àüüȭ¸éÀ¸·Î ¿µ»óÀ» °¨»óÇÒ ¼ö
204 ÀÖ½À´Ï´Ù. »Ó¸¸¾Æ´Ï¶ó, Çѱ¹¾î, ¿µ¾î, Çë°¡¸®¾î, Ã¼ÄÚ¾î, ·¯½Ã¾Æ¾îµîÀÇ
205 ºÎµå·¯¿î(antialiased) ÀÚ¸·ÆùÆ®µµ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
206
207 %description -l pl
208 Odtwarzacz wideo. Wspierane formaty wej¶ciowe: VCD (VideoCD), MPEG1/2,
209 RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
210 (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
211 Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
212 Wspierane urz±dzenia wyj¶ciowe: Matrox G200/G400, X11 opcjonalnie z
213 rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
214 G400 u¿ywaj±c framebuffera, Voodoo2/3, SDL v1.1.7 itp.
215
216 Je¶li chcesz u¿ywaæ kodeków win32, zainstaluj pakiet w32codec.
217
218 %description -l pt_BR
219 MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
220 áudio. Diferentes mecanismos de reprodução podem também ser
221 escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
222
223 %prep
224 %if %{snapshot}
225 %setup -q -n %{name}-%{snap} -a 1 -a 3 -a 6
226 %else
227 %setup -q -n %{sname}-%{version}%{pre} -a 3 -a 6
228 %endif
229
230 cp -f etc/codecs.conf etc/codecs.win32.conf
231 %patch0 -p1
232 %patch1 -p0
233 ##%patch2 -p1
234 ##%patch3 -p1   -- old home_etc behavior
235 %patch4 -p1
236 %patch5 -p1
237 %if %{with gtk2}
238 %patch6 -p1
239 %endif
240 %patch7 -p1
241 %patch8 -p1
242 %patch9 -p1
243 #%%patch10 -p1
244 %patch11 -p1
245 %patch12 -p1
246
247 # kill evil file, hackery not needed with llh
248 echo > osdep/kerneltwosix.h
249
250 find . -type d -name CVS -print | xargs rm -rf
251
252 %build
253 CFLAGS="%{rpmcflags}"
254 CC="%{__cc}"
255 export CC CFLAGS
256 ./configure \
257         --prefix=%{_prefix} \
258         --confdir=%{_sysconfdir}/mplayer \
259         --with-x11incdir=%{_prefix}/X11R6/include \
260         --with-extraincdir=%{_includedir}/xvid \
261         --enable-menu \
262 %ifnarch %{ix86}
263         --disable-mmx \
264         --disable-mmx2 \
265         --disable-3dnow \
266         --disable-3dnowex \
267         --disable-sse \
268         --disable-sse2 \
269         --disable-fastmemcpy \
270 %endif
271 %ifarch ppc
272 %{!?with_altivec:--disable-altivec} \
273 %endif
274 %{?with_directfb:--enable-directfb} \
275 %{!?with_directfb:--disable-directfb} \
276 %{!?with_divx4linux:--disable-divx4linux} \
277 %{?with_divx4linux:--with-extraincdir=/usr/include/divx} \
278 %{!?with_dxr3:--disable-dxr3} \
279 %{!?with_ggi:--disable-ggi} \
280 %{?with_live:--enable-live --with-livelibdir=%{_libdir}/liveMedia --with-extraincdir=/usr/include/liveMedia } \
281 %{!?with_live:--disable-live} \
282 %{!?with_nas:--disable-nas} \
283 %{!?with_svga:--disable-svga} \
284 %{!?with_aalib:--disable-aa} \
285 %{!?with_jack:--disable-jack} \
286 %{!?with_alsa:--disable-alsa} \
287 %{?with_alsa:--enable-alsa --disable-select} \
288 %{!?with_arts:--disable-arts} \
289 %{!?with_caca:--disable-caca} \
290 %{!?with_dshow:--disable-dshow} \
291 %{?with_gui:--enable-gui} \
292 %{?with_joystick:--enable-joystick} \
293 %{!?with_libdv:--disable-libdv} \
294 %{!?with_libdts:--disable-libdts} \
295 %{!?with_lirc:--disable-lirc} \
296 %{!?with_mad:--disable-mad} \
297 %{!?with_polyp:--disable-polyp} \
298 %{!?with_quicktime:--disable-qtx} \
299 %{!?with_real:--disable-real} \
300 %{!?with_runtime:--disable-runtime-cpudetection} \
301 %{?with_runtime:--enable-runtime-cpudetection} \
302 %{!?with_select:--disable-select} \
303 %{!?with_smb:--disable-smb} \
304 %{!?with_win32:--disable-win32} \
305 %{!?with_vorbis:--disable-vorbis} \
306 %{?with_osd:--enable-menu} \
307 %{!?with_theora:--disable-theora} \
308 %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
309 %{!?with_mencoder:--disable-mencoder} \
310         --enable-external-faad \
311         --enable-dga \
312         --enable-fbdev \
313         --enable-gl \
314         --enable-mga \
315         --enable-sdl \
316         --enable-tdfxfb \
317         --enable-vm \
318         --enable-x11 \
319         --enable-xmga \
320         --enable-xv \
321         --enable-xvmc \
322         --enable-xvid \
323         --enable-largefiles \
324         --language=all \
325         --with-codecsdir=%{_libdir}/codecs \
326         --enable-dynamic-plugins
327
328 %{__make}
329
330 %{__make} -j1 -C DOCS/xml
331
332 %install
333 rm -rf $RPM_BUILD_ROOT
334 install -d \
335         $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
336         $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
337         $RPM_BUILD_ROOT{%{_datadir}/mplayer/Skin,%{_libdir}/mplayer/vidix} \
338         $RPM_BUILD_ROOT%{_desktopdir}
339
340 # default config files
341 awk '/Delete this default/{a++};{if(!a){print}}' etc/example.conf > etc/mplayer.conf
342 install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
343
344 # executables
345 %if %{with mencoder}
346 install mencoder $RPM_BUILD_ROOT%{_bindir}
347 %endif
348 install mplayer $RPM_BUILD_ROOT%{_bindir}
349 ln -sf mplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer
350
351 # fonts
352 rm -f font-*/runme
353 cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
354 ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
355
356 # skin
357 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin
358 mv $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/Blue $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/default
359 rm -rf $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/*/CVS
360
361 # libraries
362 %ifarch %{ix86}
363 install libdha/libdha.so.1.0 $RPM_BUILD_ROOT%{_libdir}
364 install vidix/drivers/*.so $RPM_BUILD_ROOT%{_libdir}/mplayer/vidix
365 %endif
366
367 # X-files
368 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
369 install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
370 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
371
372 # man pages
373 install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
374 install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
375 install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
376 install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
377 install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
378 install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
379 install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
380 install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
381 install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
382 install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
383
384 %clean
385 rm -rf $RPM_BUILD_ROOT
386
387 %post
388 umask 022
389 /sbin/ldconfig
390 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
391
392 %postun
393 umask 022
394 /sbin/ldconfig
395 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
396
397 %files
398 %defattr(644,root,root,755)
399 %doc DOCS/HTML/en/*.html DOCS/tech %{?with_win32:etc/codecs.win32.conf}
400 %lang(de) %doc DOCS/de
401 %lang(es) %doc DOCS/HTML/es
402 %lang(fr) %doc DOCS/HTML/fr
403 %lang(hu) %doc DOCS/HTML/hu
404 %lang(it) %doc DOCS/it
405 %lang(pl) %doc DOCS/HTML/pl
406 %lang(ru) %doc DOCS/HTML/ru
407 %lang(zh_CN) %doc DOCS/zh
408 %doc README AUTHORS ChangeLog
409 %attr(755,root,root) %{_bindir}/*
410 %ifarch %{ix86}
411 %attr(755,root,root) %{_libdir}/libdha.so.*.*
412 %attr(755,root,root) %{_libdir}/mplayer
413 %endif
414 %{_datadir}/mplayer
415 %dir %{_sysconfdir}/mplayer
416 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mplayer/*.conf
417 %{_mandir}/man1/*
418 %lang(cs) %{_mandir}/cs/man1/*
419 %lang(de) %{_mandir}/de/man1/*
420 %lang(es) %{_mandir}/es/man1/*
421 %lang(fr) %{_mandir}/fr/man1/*
422 %lang(hu) %{_mandir}/hu/man1/*
423 %lang(it) %{_mandir}/it/man1/*
424 %lang(pl) %{_mandir}/pl/man1/*
425 %lang(sv) %{_mandir}/sv/man1/*
426 %lang(zh_CN) %{_mandir}/zh_CN/man1/*
427 %if %{with gui}
428 %{_desktopdir}/gmplayer.desktop
429 %endif
430 %{_desktopdir}/mplayer.desktop
431 %{_pixmapsdir}/*
This page took 0.067922 seconds and 3 git commands to generate.