2 %bcond_with directfb # with DirectFB video output
3 %bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
4 %bcond_with ggi # with ggi video output
5 %bcond_with nas # with NAS audio output
6 %bcond_with svga # with svgalib video output
7 %bcond_without osd # with osd menu support
8 %bcond_without altivec # without altivec support
9 %bcond_without x264 # without x264 support
10 %bcond_with xmms # with XMMS inputplugin support
11 %bcond_without aalib # without aalib video output
12 %bcond_without jack # without JACKD support
13 %bcond_without alsa # without ALSA audio output
14 %bcond_without arts # without arts audio output
15 %bcond_without caca # without libcaca video output
16 %bcond_without cdparanoia # without cdparanoia support
17 %bcond_without dvdnav # without dvdnav support
18 %bcond_without enca # disable using ENCA charset oracle library
19 %bcond_without esd # disable EsounD sound support
20 %bcond_without faad # disable FAAD2 (AAC) support
21 %bcond_without gif # disable GIF support
22 %bcond_without gui # without GTK+ GUI
23 %bcond_without joystick # disable joystick support
24 %bcond_without libdts # disable libdts support
25 %bcond_without libdv # disable libdv en/decoding support
26 %bcond_without lirc # without lirc support
27 %bcond_without live # without LIVE555 libraries
28 %bcond_without lzo # with LZO support (requires lzo 2.x)
29 %bcond_without mad # without mad (audio MPEG) support
30 %bcond_without pulseaudio # without pulseaudio output
31 %bcond_without quicktime # without binary quicktime dll support
32 %bcond_without real # without Real* 8/9 codecs support
33 %bcond_without runtime # disable runtime cpu detection, just detect CPU
34 # in compile time (advertised by mplayer authors as working faster); in this case
35 # mplayer may not work on machine other then where it was compiled
36 %bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
37 %bcond_without smb # disable Samba (SMB) input support
38 %bcond_without theora # without theora support
39 %bcond_without win32 # without win32 codecs support
40 %bcond_without vdpau # disable vdpau
41 %bcond_without vidix # disable vidix
42 %bcond_without vorbis # without Ogg-Vorbis audio support
43 %bcond_without xvid # disable XviD codec
44 %bcond_without mencoder # disable mencoder (a/v encoder) compilation
45 %bcond_without sdl # disable SDL
46 %bcond_without doc # don't build docs (slow)
47 %bcond_with shared # experimental libmplayer.so support
48 %bcond_with amr # enable Adaptive Multi Rate (AMR) speech codec support
49 %bcond_without gnomess # disable controling gnome screensaver
50 %bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
51 %bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer)
59 %undefine with_quicktime
63 %ifnarch %{ix86} %{x8664} ppc ppc64
64 %undefine with_runtime
67 %if %{_lib} == "lib64"
77 Summary: MPlayer - THE Movie Player for UN*X
78 Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
79 Summary(es.UTF-8): Otro reproductor de películas
80 Summary(ko.UTF-8): 리눅스용 미디어플레이어
81 Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
82 Summary(pt_BR.UTF-8): Reprodutor de filmes
85 Release: 5.%{subver}_svn%{svnver}.%{rel}
86 # DO NOT increase epoch unless it's really neccessary!
87 # especially such changes like pre7->pre7try2, increase Release instead!
88 # PS: $ rpmvercmp pre7try2 pre7
92 Group: Applications/Multimedia
93 Source0: mplayer-r%{svnver}.tar.xz
94 # Source0-md5: b3261cc2e8cb2240131e58e0ce734f8a
95 Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
96 # Source3-md5: 7b47904a925cf58ea546ca15f3df160c
97 Source5: g%{name}.desktop
98 Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
99 # Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312
101 Source8: %{name}.desktop
102 # http://www.on2.com/gpl/mplayer/
103 Source9: http://support.on2.com/gpl/mplayer/2009-10-08-mencoder-on2flixenglinux.tar.bz2
104 # Source9-md5: 07774a2663a8fda07c308df0c6569b56
105 Patch1: %{name}-cp1250-fontdesc.patch
106 Patch4: %{name}-350.patch
107 Patch8: %{name}-altivec.patch
108 # TODO, but ldflags first
109 Patch14: %{name}-shared.patch
110 Patch17: %{name}-auto-expand.patch
112 #Patch18: %{name}-gnome-screensaver.patch
113 Patch19: %{name}-on2flix.patch
114 Patch22: %{name}-ffmpeg.patch
115 Patch24: %{name}-fontconfig_sub.patch
116 Patch26: %{name}-check-byteswap.patch
117 Patch27: %{name}-release_directfb.patch
118 Patch28: %{name}-shared_live.patch
119 URL: http://www.mplayerhq.hu/
120 %{?with_directfb:BuildRequires: DirectFB-devel}
121 BuildRequires: OpenAL-devel
122 BuildRequires: OpenGL-devel
123 %{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
124 %{?with_aalib:BuildRequires: aalib-devel}
125 %{?with_alsa:BuildRequires: alsa-lib-devel}
127 BuildRequires: opencore-amr
129 %{?with_arts:BuildRequires: artsc-devel}
130 %{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
131 %{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
132 %{?with_doc:BuildRequires: docbook-style-xsl}
133 %{?with_doc:BuildRequires: docbook-dtd412-xml}
134 %{?with_dxr3:BuildRequires: em8300-devel}
135 %{?with_enca:BuildRequires: enca-devel}
136 %{?with_esd:BuildRequires: esound-devel}
137 BuildRequires: faac-devel
138 %{?with_faad:BuildRequires: faad2-devel >= 2.0}
139 %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3}
140 BuildRequires: freetype-devel
141 BuildRequires: fribidi-devel
142 %{?with_vidix:BuildRequires: vidix-devel}
144 %{?with_altivec:BuildRequires: gcc >= 5:3.3.2-3}
146 %{?with_gif:BuildRequires: giflib-devel}
148 BuildRequires: gtk+2-devel
150 %{?with_gnomess:BuildRequires: dbus-glib-devel}
151 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
152 %{?with_jack:%requires_eq jack-audio-connection-kit-libs}
153 BuildRequires: lame-libs-devel
154 %{?with_caca:BuildRequires: libcaca-devel}
155 %{?with_libdts:BuildRequires: libdts-devel}
156 %{?with_libdv:BuildRequires: libdv-devel}
157 %{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3}
158 %{?with_ggi:BuildRequires: libggi-devel}
159 BuildRequires: libjpeg-devel
160 %{?with_mad:BuildRequires: libmad-devel}
161 BuildRequires: libmpcdec-devel >= 1.2.1
162 BuildRequires: libpng-devel
163 %{?with_smb:BuildRequires: libsmbclient-devel}
164 %{?with_theora:BuildRequires: libtheora-devel}
165 # tremor is used by default, internal as we don't have system one
166 #%{?with_vorbis:BuildRequires: libvorbis-devel}
167 %{?with_x264:BuildRequires: libx264-devel >= 0.1.2-1.20081023_2245.1}
168 %{?with_vdpau:BuildRequires: libvdpau-devel}
169 BuildRequires: libxslt-progs
170 %{?with_lirc:BuildRequires: lirc-devel}
171 %{?with_live:BuildRequires: live-devel}
172 %{?with_lzo:BuildRequires: lzo-devel >= 2.0}
173 %{?with_nas:BuildRequires: nas-devel}
174 BuildRequires: ncurses-devel
175 BuildRequires: pkgconfig
176 %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
177 BuildRequires: rpmbuild(macros) >= 1.527
178 BuildRequires: speex-devel >= 1.1
179 %{?with_svga:BuildRequires: svgalib-devel}
180 %{?with_xmms:BuildRequires: xmms-libs}
181 BuildRequires: xorg-lib-libX11-devel
182 BuildRequires: xorg-lib-libXext-devel
183 BuildRequires: xorg-lib-libXinerama-devel
184 BuildRequires: xorg-lib-libXv-devel
185 BuildRequires: xorg-lib-libXvMC-devel
186 BuildRequires: xorg-lib-libXxf86dga-devel
187 BuildRequires: xorg-lib-libXxf86vm-devel
188 %{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
189 BuildRequires: zlib-devel
190 Requires: %{name}-common = %{epoch}:%{version}-%{release}
192 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
194 %define _noautoreqdep libGL.so.1 libGLU.so.1
195 %define specflags_ia32 -fomit-frame-pointer
197 %define specflags_ppc -maltivec
201 Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
202 AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
203 MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
204 MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
205 devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
206 optionally with SHM extension, X11 using overlays with the Xvideo
207 extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
208 Voodoo2/3 hardware, SDL v1.1.7 driver etc.
210 If you want to use win32 codecs install w32codec package.
212 %description -l de.UTF-8
213 MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
214 Kennzeichnend ist die herausragende Format- und
215 Plattform-Kompatibilität.
217 Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
218 plattformexklusive, wodurch etwa Windows Media auch außerhalb von
219 Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
220 Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
221 ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
222 Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
223 installierte Codecs nicht mit MPlayer kollidieren können.
225 %description -l es.UTF-8
226 Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
227 MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
228 (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
229 de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
230 Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
231 G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
232 overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
233 G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
236 Si quiere usar codecs Win32, instale el paquete w32codec.
238 %description -l ko.UTF-8
239 MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
240 파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
241 MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
242 Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
243 (Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
244 수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
245 크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
246 있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
247 부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
249 %description -l pl.UTF-8
250 Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
251 RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
252 (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
253 Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
254 Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
255 rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
256 G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
258 Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
260 %description -l pt_BR.UTF-8
261 MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
262 áudio. Diferentes mecanismos de reprodução podem também ser
263 escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
266 Summary: MPlayer with GTK+ GUI interface
267 Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+
268 Group: X11/Applications/Multimedia
269 Requires: %{name}-common = %{epoch}:%{version}-%{release}
270 Requires: %{name}-skin
272 %description -n gmplayer
273 MPlayer with GUI GTK+ interface.
275 %description -n gmplayer -l pl.UTF-8
276 MPlayer z graficznym interfejsem GTK+.
279 Summary: Configuration files and documentation for MPlayer
280 Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera
281 Group: Applications/Multimedia
282 Obsoletes: mplayer-vidix
285 Configuration files, man page and HTML documentation for MPlayer.
287 %description common -l pl.UTF-8
288 Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
291 Summary: MEncoder - a movie encoder for Linux
292 Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa
293 Group: Applications/Multimedia
294 Requires: %{name}-common = %{epoch}:%{version}-%{release}
296 %description -n mencoder
297 MEncoder is a movie encoder for Linux and is a part of the MPlayer
300 %description -n mencoder -l pl.UTF-8
301 MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
304 %setup -q -n mplayer-r%{svnver} -a3 -a6 -a9
305 cp -f etc/codecs.conf etc/codecs.win32.conf
309 #%%patch13 -p1 # TODO
319 mv mencoder-on2flixenglinux{-*-*-*,}
320 #cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux
321 #for a in mencoder-on2flixenglinux/patch/*.diff; do
325 %{?with_system_ffmpeg:%patch22 -p1}
333 # sparky: works again ?
334 # recent dvdnav-config doesn't support --minilibs.
335 #sed -i 's:--minilibs:--libs:g' configure
338 %if "x%{svnver}" != "x%{nil}"
339 echo "SVN-r%{svnver}" > VERSION
342 cat etc/example.conf > etc/mplayer.conf
344 %if %{with system_ffmpeg}
345 # using external ffmpeg, but mplayer adds these to includepath
346 rm -r libavcodec libavdevice libavformat libavutil libpostproc libswscale
350 sed 's/STREAM_NONCACHEABLE/STREAM_NON_CACHEABLE/' -i stream/stream_live555.c
353 CFLAGS="%{rpmcflags} %{?with_shared:-fPIC}"
354 CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb}"
355 %{?with_live:CFLAGS="$CFLAGS -I/usr/include/liveMedia"}
362 %{?debug:--enable-debug=3} \
363 --prefix=%{_prefix} \
364 --confdir=%{_sysconfdir}/mplayer \
366 --extra-cflags="$CFLAGS" \
367 --extra-ldflags="%{rpmldflags} %{?_x_libraries:-L%{_x_libraries}}" \
368 %if %{with system_ffmpeg}
369 --disable-libavutil_a \
370 --disable-libavcodec_a \
371 --disable-libavformat_a \
372 --disable-libpostproc_a \
373 --enable-libavutil_so \
374 --enable-libavcodec_so \
375 --enable-libavformat_so \
376 --enable-libpostproc_so \
378 %ifnarch %{ix86} %{x8664}
385 --disable-fastmemcpy \
389 %{__disable altivec} \
391 %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb} \
392 %{__enable_disable directfb} \
396 %{__disable lzo liblzo} \
399 %{__disable aalib aa} \
401 %{__enable_disable alsa} \
404 %{__disable cdparanoia} \
407 --disable-faad-internal \
410 %{__enable joystick} \
412 %{__disable libdts libdca} \
413 %{__enable_disable lirc} \
415 %{__disable pulseaudio pulse} \
416 %{__disable quicktime qtx} \
418 %{__enable_disable runtime runtime-cpudetection} \
419 %{__disable select} \
421 %{__disable win32 win32dll} \
422 %{__disable vorbis libvorbis} \
423 %{__enable osd menu} \
424 %{__disable theora} \
426 %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
430 %{__disable mencoder} \
433 %{__enable_disable dvdnav} \
438 --enable-radio-capture \
439 %{__enable_disable sdl} \
446 --with-xvmclib=XvMCW \
447 --enable-dynamic-plugins \
448 --enable-largefiles \
450 --codecsdir=%{_libdir}/codecs \
458 build --enable-gui --disable-mencoder
459 mv -f mplayer gmplayer
463 # now build regular version
467 %{__make} -j1 -C DOCS/xml
471 rm -rf $RPM_BUILD_ROOT
473 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
474 $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
475 $RPM_BUILD_ROOT%{_datadir}/%{name}/skins \
476 $RPM_BUILD_ROOT%{_desktopdir}
478 # default config files
479 install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
483 install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
484 ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
486 install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
487 ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
489 install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
490 ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
494 cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
495 ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
498 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
500 touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
501 install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
502 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
505 install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
506 install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
507 install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
508 install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
509 install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
510 install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
511 install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
512 install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
513 #install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
514 #install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
517 rm -rf $RPM_BUILD_ROOT
521 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
525 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
528 %defattr(644,root,root,755)
529 %attr(755,root,root) %{_bindir}/mplayer*
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_bindir}/gmplayer*
535 %{_desktopdir}/gmplayer.desktop
540 %defattr(644,root,root,755)
541 %doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt
542 %doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt
543 %doc DOCS/tech/colorspaces.txt
544 %attr(755,root,root) %{_bindir}/mencoder*
548 %defattr(644,root,root,755)
551 %doc etc/codecs.win32.conf
554 # HTML and XML-generated docs
556 %lang(cs) %doc DOCS/HTML/cs
557 %lang(de) %doc DOCS/HTML/de
558 %lang(es) %doc DOCS/HTML/es
559 %lang(fr) %doc DOCS/HTML/fr
560 %lang(hu) %doc DOCS/HTML/hu
561 %lang(pl) %doc DOCS/HTML/pl
562 %lang(ru) %doc DOCS/HTML/ru
563 #%lang(zh_CN) %doc DOCS/zh
567 %dir %{_sysconfdir}/%{name}
568 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
570 %lang(cs) %{_mandir}/cs/man1/*
571 %lang(de) %{_mandir}/de/man1/*
572 %lang(es) %{_mandir}/es/man1/*
573 %lang(fr) %{_mandir}/fr/man1/*
574 %lang(hu) %{_mandir}/hu/man1/*
575 %lang(it) %{_mandir}/it/man1/*
576 %lang(pl) %{_mandir}/pl/man1/*
577 #%lang(sv) %{_mandir}/sv/man1/*
578 #%lang(zh_CN) %{_mandir}/zh_CN/man1/*
579 %{_desktopdir}/mplayer.desktop
580 %{_pixmapsdir}/mplayer.png
581 %dir %{_datadir}/%{name}
582 %{_datadir}/%{name}/font*
583 %dir %{_datadir}/%{name}/skins
584 %ghost %{_datadir}/%{name}/skins/default