]> git.pld-linux.org Git - packages/mplayer.git/blame - mplayer.spec
- libvo objects needs explicit -lX11 -lXext.
[packages/mplayer.git] / mplayer.spec
CommitLineData
37050656 1#
94cb018b 2# Conditional build:
8cc223f8 3%bcond_with directfb # with DirectFB video output
8cc223f8
JB
4%bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
5%bcond_with ggi # with ggi video output
8cc223f8
JB
6%bcond_with nas # with NAS audio output
7%bcond_with svga # with svgalib video output
01a889a4 8%bcond_without osd # with osd menu support
93ab9715 9%bcond_without altivec # without altivec support
bbab8eb7 10%bcond_without x264 # without x264 support
2af58a38 11%bcond_with xmms # with XMMS inputplugin support
8cc223f8 12%bcond_without aalib # without aalib video output
e5b91f83 13%bcond_without jack # without JACKD support
8cc223f8 14%bcond_without alsa # without ALSA audio output
12768ddc 15%bcond_with arts # with arts audio output
dd153a0d 16%bcond_without caca # without libcaca video output
3c3fdfcc 17%bcond_without cdparanoia # without cdparanoia support
32272421 18%bcond_without dvdnav # without dvdnav support
3c3fdfcc 19%bcond_without enca # disable using ENCA charset oracle library
18c746ca 20%bcond_with esd # enable EsounD sound support
3c3fdfcc
JB
21%bcond_without faad # disable FAAD2 (AAC) support
22%bcond_without gif # disable GIF support
8d7378f8 23%bcond_without gui # without GTK+ GUI
8cc223f8 24%bcond_without joystick # disable joystick support
3c3fdfcc 25%bcond_without libdts # disable libdts support
a4298e0c 26%bcond_without libdv # disable libdv en/decoding support
8cc223f8 27%bcond_without lirc # without lirc support
5244e474 28%bcond_without live # without LIVE555 libraries
841cb995 29%bcond_without lzo # with LZO support (requires lzo 2.x)
8cc223f8 30%bcond_without mad # without mad (audio MPEG) support
7d814b48 31%bcond_without pulseaudio # without pulseaudio output
8cc223f8
JB
32%bcond_without quicktime # without binary quicktime dll support
33%bcond_without real # without Real* 8/9 codecs support
34%bcond_without runtime # disable runtime cpu detection, just detect CPU
11421384
ER
35 # in compile time (advertised by mplayer authors as working faster); in this case
36 # mplayer may not work on machine other then where it was compiled
37%bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
a4298e0c 38%bcond_without smb # disable Samba (SMB) input support
de0c2d91 39%bcond_without theora # without theora support
8cc223f8 40%bcond_without win32 # without win32 codecs support
53f97285 41%bcond_without vdpau # disable vdpau
1087e996 42%bcond_without vidix # disable vidix
3b930ad6 43%bcond_without vorbis # without Ogg-Vorbis audio support
d1f72115 44%bcond_with system_vorbis # use system libvorbis instead of internal tremor
3c3fdfcc 45%bcond_without xvid # disable XviD codec
2af58a38 46%bcond_without mencoder # disable mencoder (a/v encoder) compilation
906bf13b 47%bcond_without sdl # disable SDL
aab7d90d 48%bcond_without doc # don't build docs (slow)
59a38ff4 49%bcond_with shared # experimental libmplayer.so support
b69a6f83 50%bcond_without amr # enable Adaptive Multi Rate (AMR) speech codec support
0256d486 51%bcond_without gnomess # disable controling gnome screensaver
759ef2d3
ER
52%bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
53%bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer)
d1f72115 54%bcond_with on2 # with patches from On2 Flix Engine for Linux
5dcdda0f
ER
55%if "%{pld_release}" == "ac"
56%bcond_with hidden_visibility # no gcc hidden visibility
57%else
58%bcond_without hidden_visibility # no gcc hidden visibility
59%endif
2dfabf36 60
9accd5e5 61%if %{with alsa}
62%undefine with_select
63%endif
64
d1f72115 65%if %{without vorbis}
66%undefine with_system_vorbis
67%endif
68
94cb018b
JB
69%ifnarch %{ix86}
70%undefine with_win32
7a82c266 71%undefine with_quicktime
1087e996 72%undefine with_vidix
94cb018b
JB
73%endif
74
38c74592 75%ifnarch %{ix86} %{x8664} ppc ppc64
906bf13b
JB
76%undefine with_runtime
77%endif
1a8df7bd 78
ca278bdf
ER
79%ifnarch %{ix86} %{x8664}
80%undefine with_vdpau
81%endif
82
3d17ae18
ER
83%ifnarch ppc
84%undefine with_altivec
85%endif
86
1a8df7bd 87%if %{_lib} == "lib64"
422903c7 88%define _suf 64
1a8df7bd 89%else
422903c7 90%define _suf 32
1a8df7bd 91%endif
92
53f97285 93%define subver rc4
427af63d 94%define svnver 31097
e245ad6d 95%define rel 5
906bf13b 96Summary: MPlayer - THE Movie Player for UN*X
eeb91a66
ER
97Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
98Summary(es.UTF-8): Otro reproductor de películas
99Summary(ko.UTF-8): 리눅스용 미디어플레이어
100Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
101Summary(pt_BR.UTF-8): Reprodutor de filmes
2adea73e 102Name: mplayer
9cb1ef87 103Version: 1.0
71d2d72a 104Release: 5.%{subver}_svn%{svnver}.%{rel}
1f85fd72
ER
105# DO NOT increase epoch unless it's really neccessary!
106# especially such changes like pre7->pre7try2, increase Release instead!
107# PS: $ rpmvercmp pre7try2 pre7
108# pre7try2 > pre7
59476b48 109Epoch: 3
bc426a7f 110License: GPL
906bf13b 111Group: Applications/Multimedia
427af63d
AM
112# svn co svn://svn.mplayerhq.hu/mplayer/trunk mplayer-rXXX
113# tar --exclude-vcs -cvJf mplayer-rXXX.tar.xz mplayer-rXXX
5dcdda0f 114Source0: %{name}-r%{svnver}.tar.xz
1acec525 115# Source0-md5: 7e70fb6582890c60329b8fb5f34423d5
031c3c7c 116Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
0a38bda8 117# Source3-md5: 7b47904a925cf58ea546ca15f3df160c
e601cd91 118Source5: g%{name}.desktop
623ea2d1 119Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
0a38bda8 120# Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312
11b89ef7 121Source7: %{name}.png
24481cd2 122Source8: %{name}.desktop
dfd680ce 123# http://www.on2.com/gpl/mplayer/
53f97285 124Source9: http://support.on2.com/gpl/mplayer/2009-10-08-mencoder-on2flixenglinux.tar.bz2
125# Source9-md5: 07774a2663a8fda07c308df0c6569b56
79907b07 126
127# build (configure / Makefile) related:
128Patch10: %{name}-ldflags.patch
129Patch11: %{name}-altivec.patch
130Patch12: %{name}-check-byteswap.patch
c2bf8f19 131Patch13: %{name}-visibility-hidden-fix.patch
132Patch14: %{name}-ffmpeg.patch
133Patch15: %{name}-shared_live.patch
134Patch16: %{name}-shared.patch
79907b07 135
136# codecs, outputs, demuxers:
137Patch20: %{name}-auto-expand.patch
138Patch21: %{name}-release_directfb.patch
139
140# goodies:
141Patch30: %{name}-cp1250-fontdesc.patch
2833f81f 142Patch31: %{name}-350.patch
d1f72115 143# update, hard to fix right now because of gnome bug 579430:
144# https://bugzilla.gnome.org/show_bug.cgi?id=579430
2833f81f 145#Patch32: %{name}-gnome-screensaver.patch
79907b07 146
147Patch100: %{name}-on2flix.patch
148
c5b97685 149URL: http://www.mplayerhq.hu/
33c4efab 150%{?with_directfb:BuildRequires: DirectFB-devel}
aeb67db6 151BuildRequires: OpenAL-devel
b458005d 152BuildRequires: OpenGL-devel
11421384 153%{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
dd6c659c
JB
154%{?with_aalib:BuildRequires: aalib-devel}
155%{?with_alsa:BuildRequires: alsa-lib-devel}
156%{?with_arts:BuildRequires: artsc-devel}
841cb995 157%{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
3c3fdfcc 158%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
c521a17c 159BuildRequires: dirac-devel
5dcdda0f
ER
160%{?with_doc:BuildRequires: docbook-dtd412-xml}
161%{?with_doc:BuildRequires: docbook-style-xsl}
dd6c659c 162%{?with_dxr3:BuildRequires: em8300-devel}
3c3fdfcc
JB
163%{?with_enca:BuildRequires: enca-devel}
164%{?with_esd:BuildRequires: esound-devel}
30e3739f 165BuildRequires: faac-devel
3c3fdfcc 166%{?with_faad:BuildRequires: faad2-devel >= 2.0}
759ef2d3 167%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3}
c521a17c 168BuildRequires: freetype-devel >= 2.0.9
30e3739f 169BuildRequires: fribidi-devel
d6542bb9 170BuildRequires: tar >= 1:1.22
1087e996 171%{?with_vidix:BuildRequires: vidix-devel}
3d17ae18 172%{?with_altivec:BuildRequires: gcc >= 5:4.1}
5dcdda0f 173%{?with_gnomess:BuildRequires: dbus-glib-devel}
3c3fdfcc 174%{?with_gif:BuildRequires: giflib-devel}
d1f72115 175%{?with_gui:BuildRequires: gtk+2-devel}
d336e259 176%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
422903c7 177%{?with_jack:%requires_eq jack-audio-connection-kit-libs}
a8a0c1d1 178BuildRequires: lame-libs-devel
dd6c659c 179%{?with_caca:BuildRequires: libcaca-devel}
49aed190 180%{?with_libdts:BuildRequires: libdts-devel}
c521a17c 181%{?with_libdv:BuildRequires: libdv-devel > 0.9.5}
759ef2d3 182%{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3}
dd6c659c 183%{?with_ggi:BuildRequires: libggi-devel}
af480c75 184BuildRequires: libjpeg-devel
dd6c659c 185%{?with_mad:BuildRequires: libmad-devel}
c521a17c 186BuildRequires: libmng-devel
30e3739f 187BuildRequires: libmpcdec-devel >= 1.2.1
af480c75 188BuildRequires: libpng-devel
a4298e0c 189%{?with_smb:BuildRequires: libsmbclient-devel}
de0c2d91 190%{?with_theora:BuildRequires: libtheora-devel}
5dcdda0f 191%{?with_vdpau:BuildRequires: libvdpau-devel}
d1f72115 192%{?with_system_vorbis:BuildRequires: libvorbis-devel}
bbab8eb7 193%{?with_x264:BuildRequires: libx264-devel >= 0.1.3}
ceb01d0e 194BuildRequires: libxslt-progs
dd6c659c 195%{?with_lirc:BuildRequires: lirc-devel}
5244e474 196%{?with_live:BuildRequires: live-devel}
841cb995 197%{?with_lzo:BuildRequires: lzo-devel >= 2.0}
dd6c659c 198%{?with_nas:BuildRequires: nas-devel}
b458005d 199BuildRequires: ncurses-devel
b69a6f83 200%{?with_amr:BuildRequires: opencore-amr-devel}
e9d22b19 201BuildRequires: pkgconfig
86bc294f 202%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
5dcdda0f 203BuildRequires: rpm >= 4.4.9-56
9accd5e5 204BuildRequires: rpmbuild(macros) >= 1.527
c521a17c 205BuildRequires: schroedinger-devel
aeb67db6 206BuildRequires: speex-devel >= 1.1
dd6c659c 207%{?with_svga:BuildRequires: svgalib-devel}
c521a17c 208BuildRequires: twolame-devel
209%{?with_xmms:BuildRequires: xmms-devel}
5dcdda0f
ER
210%{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
211%ifarch %{ix86} %{x8664}
212BuildRequires: yasm
213%endif
214BuildRequires: zlib-devel
215%if "%{pld_release}" == "ac"
216BuildRequires: XFree86-devel >= 4.0.2
217%else
627a7a97 218BuildRequires: xorg-lib-libX11-devel
c521a17c 219BuildRequires: xorg-lib-libXScrnSaver-devel
627a7a97
ER
220BuildRequires: xorg-lib-libXext-devel
221BuildRequires: xorg-lib-libXinerama-devel
222BuildRequires: xorg-lib-libXv-devel
223BuildRequires: xorg-lib-libXvMC-devel
224BuildRequires: xorg-lib-libXxf86dga-devel
225BuildRequires: xorg-lib-libXxf86vm-devel
c521a17c 226%endif
4d75c49f 227Requires: %{name}-common = %{epoch}:%{version}-%{release}
b458005d 228Requires: OpenGL
0f2a502d 229BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
2adea73e 230
a8e3a9a7 231%define _noautoreqdep libGL.so.1 libGLU.so.1
bb27cfbd 232%define specflags_ia32 -fomit-frame-pointer
198487b4 233%if %{with altivec}
adfd0023 234%define specflags_ppc -maltivec
20a66bdb 235%endif
2adea73e 236
e245ad6d
ER
237%if "%{pld_release}" == "ac"
238%ifarch ppc
239%define __cc gcc4
240%endif
241%endif
242
2adea73e 243%description
c902f7c6 244Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
245AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
6db4b1ea 246MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
247MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
c902f7c6 248devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
249optionally with SHM extension, X11 using overlays with the Xvideo
250extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
251Voodoo2/3 hardware, SDL v1.1.7 driver etc.
2adea73e 252
8b146837 253If you want to use win32 codecs install w32codec package.
4228a246 254
e011d408 255%description -l de.UTF-8
deba608c 256MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
257Kennzeichnend ist die herausragende Format- und
e011d408 258Plattform-Kompatibilität.
deba608c 259
e011d408
JR
260Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
261plattformexklusive, wodurch etwa Windows Media auch außerhalb von
262Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
263Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
deba608c 264ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
e011d408
JR
265Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
266installierte Codecs nicht mit MPlayer kollidieren können.
deba608c 267
e011d408 268%description -l es.UTF-8
c902f7c6 269Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
270MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
271(uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
272de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
273Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
e011d408
JR
274G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
275overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
c902f7c6 276G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
277v1.1.7 etc.
33c4efab 278
8b146837 279Si quiere usar codecs Win32, instale el paquete w32codec.
33c4efab 280
e011d408
JR
281%description -l ko.UTF-8
282MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
283파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
284MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
285Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
286(Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
287수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
288크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
289있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
290부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
af480c75 291
e011d408
JR
292%description -l pl.UTF-8
293Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
c902f7c6 294RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
295(nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
296Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
e011d408 297Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
c902f7c6 298rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
e011d408 299G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
2adea73e 300
e011d408 301Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
4228a246 302
e011d408
JR
303%description -l pt_BR.UTF-8
304MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
305áudio. Diferentes mecanismos de reprodução podem também ser
2abc285c 306escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
307
11421384
ER
308%package -n gmplayer
309Summary: MPlayer with GTK+ GUI interface
eeb91a66 310Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+
11421384 311Group: X11/Applications/Multimedia
11421384 312Requires: %{name}-common = %{epoch}:%{version}-%{release}
deba608c 313Requires: %{name}-skin
11421384
ER
314
315%description -n gmplayer
316MPlayer with GUI GTK+ interface.
317
e011d408 318%description -n gmplayer -l pl.UTF-8
906bf13b
JB
319MPlayer z graficznym interfejsem GTK+.
320
11421384 321%package common
906bf13b 322Summary: Configuration files and documentation for MPlayer
eeb91a66 323Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera
11421384 324Group: Applications/Multimedia
c521a17c 325Suggests: unrar
1087e996 326Obsoletes: mplayer-vidix
11421384
ER
327
328%description common
906bf13b
JB
329Configuration files, man page and HTML documentation for MPlayer.
330
e011d408 331%description common -l pl.UTF-8
906bf13b 332Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
11421384
ER
333
334%package -n mencoder
906bf13b 335Summary: MEncoder - a movie encoder for Linux
eeb91a66 336Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa
11421384
ER
337Group: Applications/Multimedia
338Requires: %{name}-common = %{epoch}:%{version}-%{release}
339
340%description -n mencoder
906bf13b
JB
341MEncoder is a movie encoder for Linux and is a part of the MPlayer
342package.
343
e011d408
JR
344%description -n mencoder -l pl.UTF-8
345MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
11421384 346
2adea73e 347%prep
5dcdda0f 348%setup -q -n %{name}-r%{svnver} -a3 -a6 -a9
833dbe20 349cp -f etc/codecs.conf etc/codecs.win32.conf
79907b07 350
351# build (configure / Makefile) related:
352%patch10 -p1
353%patch11 -p1
354%patch12 -p1
c2bf8f19 355%patch13 -p1
356%{?with_system_ffmpeg:%patch14 -p1}
357%{?with_live:%patch15 -p1}
358%{?with_shared:%patch16 -p1}
79907b07 359
360# codecs, outputs, demuxers:
361%patch20 -p1
362%patch21 -p1
363
364# goodies:
365%patch30 -p0
2833f81f 366%patch31 -p1
367#%{with_gnomess:%patch32 -p1}
59ba0205 368
dfd680ce 369# on2flix
759ef2d3 370mv mencoder-on2flixenglinux{-*-*-*,}
d1f72115 371%if %{with on2}
79907b07 372#%%patch100 -p1
d1f72115 373cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux
374# remove broken patches:
375# - first set does not apply
376# - second set beakes build
377for PATCH in asf-correct_movielength avi_check_idxflags \
378 demux_lavf-add_dv_mts_preferred demux_lavf-probe_small_files \
379 mencoder_07_demux_update_pts mencoder_10_correct_pts \
380 mpegvideo-revert_r18381 \
381 \
382 reduce_spurious_logging
383do
384 rm mencoder-on2flixenglinux/patch/$PATCH.diff
385done
386for a in mencoder-on2flixenglinux/patch/*.diff; do
387 patch -p0 < $a
388done
389%endif
dfd680ce 390
79907b07 391# Set version
53f97285 392%if "x%{svnver}" != "x%{nil}"
d1f72115 393 echo "SVN-r%{svnver}%{?with_on2:-on2}" > VERSION
53f97285 394%endif
759ef2d3 395
53f97285 396cat etc/example.conf > etc/mplayer.conf
c521a17c 397cat <<'CONFIGADD' >> etc/mplayer.conf
398
d1f72115 399######################
8b2ed1fb 400# PLD Linux Defaults #
d1f72115 401######################
2833f81f 402[default]
403
404# alternate solution for CP1250-encoded subtitles
405fontconfig = yes
406subcp = cp1250
407
408# ...or if you prefer native bitmap fonts shipped with mplayer
409#fontconfig = no
410#subcp = iso-8859-1
411
412# Standard location
413unrarexec = "%{_bindir}/unrar"
414
c521a17c 415CONFIGADD
d1732085 416
1f8d8779
ER
417%if %{with system_ffmpeg}
418# using external ffmpeg, but mplayer adds these to includepath
53f97285 419rm -r libavcodec libavdevice libavformat libavutil libpostproc libswscale
1f8d8779
ER
420%endif
421
c521a17c 422# *** HOT FIXES ***
423
424# typo, fixed in recent svn
53f97285 425sed 's/STREAM_NONCACHEABLE/STREAM_NON_CACHEABLE/' -i stream/stream_live555.c
53f97285 426
c521a17c 427# mjpeg encoder is required for Zoran hardware
428sed '/_libavencoders="MPEG/s/"$/ MJPEG_ENCODER"/' -i configure
429
2adea73e 430%build
5dcdda0f 431CFLAGS="%{rpmcflags} %{?with_hidden_visibility:-fvisibility=hidden} %{?with_shared:-fvisibility=default -fPIC}"
53f97285 432CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb}"
433%{?with_live:CFLAGS="$CFLAGS -I/usr/include/liveMedia"}
434
11421384 435build() {
c521a17c 436 set -x
53f97285 437
11421384
ER
438 ./configure \
439 %{?debug:--enable-debug=3} \
dd6c659c
JB
440 --prefix=%{_prefix} \
441 --confdir=%{_sysconfdir}/mplayer \
53f97285 442 --cc="%{__cc}" \
443 --extra-cflags="$CFLAGS" \
79907b07 444 --real-ldflags="%{rpmldflags}" \
445 --extra-ldflags="%{?_x_libraries:-L%{_x_libraries}}" \
1f8d8779 446%if %{with system_ffmpeg}
841cb995
ER
447 --disable-libavutil_a \
448 --disable-libavcodec_a \
449 --disable-libavformat_a \
450 --disable-libpostproc_a \
451 --enable-libavutil_so \
452 --enable-libavcodec_so \
453 --enable-libavformat_so \
454 --enable-libpostproc_so \
1f8d8779 455%endif
57f87bc2 456%ifnarch %{ix86} %{x8664}
dd6c659c 457 --disable-mmx \
a14f4270 458 --disable-mmxext \
dd6c659c 459 --disable-3dnow \
a14f4270 460 --disable-3dnowext \
dd6c659c
JB
461 --disable-sse \
462 --disable-sse2 \
463 --disable-fastmemcpy \
dfeec30a 464%endif
9accd5e5 465 %{__disable ssse3} \
1837afdf 466%ifarch ppc
9accd5e5 467 %{__disable altivec} \
1837afdf 468%endif
9accd5e5 469 %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb} \
470 %{__enable_disable directfb} \
471 %{__disable dxr3} \
472 %{__disable ggi} \
473 %{__disable live} \
474 %{__disable lzo liblzo} \
475 %{__disable nas} \
476 %{__disable svga} \
477 %{__disable aalib aa} \
478 %{__disable jack} \
479 %{__enable_disable alsa} \
480 %{__disable arts} \
481 %{__disable caca} \
482 %{__disable cdparanoia} \
483 %{__disable enca} \
484 %{__disable esd} \
485 --disable-faad-internal \
486 %{__disable faad} \
487 %{__disable gif} \
488 %{__enable joystick} \
489 %{__disable libdv} \
490 %{__disable libdts libdca} \
491 %{__enable_disable lirc} \
492 %{__disable mad} \
493 %{__disable pulseaudio pulse} \
494 %{__disable quicktime qtx} \
495 %{__disable real} \
496 %{__enable_disable runtime runtime-cpudetection} \
497 %{__disable select} \
498 %{__disable smb} \
499 %{__disable win32 win32dll} \
d1f72115 500 %{__disable vorbis tremor-internal} --disable-tremor %{__disable vorbis libvorbis} \
501 %{__disable_if system_vorbis tremor-internal} \
9accd5e5 502 %{__enable osd menu} \
503 %{__disable theora} \
504 %{__disable x264} \
d1732085 505 %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
9accd5e5 506 %{__disable xvid} \
507 %{__disable vidix} \
508 %{__disable vdpau} \
509 %{__disable mencoder} \
841cb995
ER
510 --enable-dga1 \
511 --enable-dga2 \
9accd5e5 512 %{__enable_disable dvdnav} \
dd6c659c
JB
513 --enable-fbdev \
514 --enable-gl \
515 --enable-mga \
e7261209
KK
516 --enable-radio \
517 --enable-radio-capture \
9accd5e5 518 %{__enable_disable sdl} \
dd6c659c
JB
519 --enable-tdfxfb \
520 --enable-vm \
521 --enable-x11 \
522 --enable-xmga \
523 --enable-xv \
524 --enable-xvmc \
0c2d081d 525 --with-xvmclib=XvMCW \
c521a17c 526 --enable-zr \
527 --enable-unrarexec \
3c3fdfcc 528 --enable-dynamic-plugins \
dd6c659c
JB
529 --enable-largefiles \
530 --language=all \
841cb995 531 --codecsdir=%{_libdir}/codecs \
11421384 532 "$@"
eb52750a 533
11421384
ER
534 %{__make}
535}
2adea73e 536
11421384
ER
537%if %{with gui}
538# build GUI version
841cb995 539build --enable-gui --disable-mencoder
11421384 540mv -f mplayer gmplayer
aeb67db6 541%{__make} distclean
11421384
ER
542%endif
543
544# now build regular version
545build --disable-gui
546
aab7d90d 547%if %{with doc}
6eeeb8b4 548%{__make} -j1 -C DOCS/xml
11421384 549%endif
ceb01d0e 550
2adea73e
AM
551%install
552rm -rf $RPM_BUILD_ROOT
e0e4b963 553install -d \
d23c171d 554 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
59ba0205 555 $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
9accd5e5 556 $RPM_BUILD_ROOT%{_datadir}/%{name}/skins \
59ba0205 557 $RPM_BUILD_ROOT%{_desktopdir}
2adea73e 558
e0e4b963 559# default config files
c455a752 560install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
e0e4b963 561
562# executables
2af58a38 563%if %{with mencoder}
1a8df7bd 564install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
565ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
2af58a38 566%endif
1a8df7bd 567install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
568ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
11421384 569%if %{with gui}
1a8df7bd 570install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
571ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
11421384 572%endif
e0e4b963 573
c2bf8f19 574%if %{with shared}
575install -d $RPM_BUILD_ROOT%{_libdir}
576install libmplayer.so $RPM_BUILD_ROOT%{_libdir}
577%endif
578
e0e4b963 579# fonts
9d62f689 580cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
6e933f9c 581ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
e0e4b963 582
11421384 583%if %{with gui}
f0d8c47e 584install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
68dd28e8 585%endif
9accd5e5 586touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
24481cd2 587install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
11b89ef7 588install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
e0e4b963 589
590# man pages
59ba0205 591install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
aee40e50 592install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
593install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
594install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
595install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
596install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
8cda16b8 597install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
aee40e50 598install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
841cb995 599#install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
53f97285 600#install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
6db4b1ea 601
2adea73e
AM
602%clean
603rm -rf $RPM_BUILD_ROOT
604
a69eaaef 605%post -n gmplayer
cd748ae6 606umask 022
cd748ae6 607[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
608
a69eaaef 609%postun -n gmplayer
cd748ae6 610umask 022
75b3147a 611[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
2ea7d522 612
2adea73e
AM
613%files
614%defattr(644,root,root,755)
1a8df7bd 615%attr(755,root,root) %{_bindir}/mplayer*
11421384
ER
616
617%if %{with gui}
618%files -n gmplayer
619%defattr(644,root,root,755)
1a8df7bd 620%attr(755,root,root) %{_bindir}/gmplayer*
11421384 621%{_desktopdir}/gmplayer.desktop
11421384
ER
622%endif
623
0fb5a7ee 624%if %{with mencoder}
11421384
ER
625%files -n mencoder
626%defattr(644,root,root,755)
aeb67db6 627%doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt
628%doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt
629%doc DOCS/tech/colorspaces.txt
1a8df7bd 630%attr(755,root,root) %{_bindir}/mencoder*
0fb5a7ee 631%endif
11421384
ER
632
633%files common
634%defattr(644,root,root,755)
11421384 635%doc DOCS/tech
c2bf8f19 636%{?with_shared:%attr(755,root,root) %{_libdir}/libmplayer.so}
11421384 637%if %{with win32}
35ac5af9 638%doc etc/codecs.win32.conf
11421384 639%endif
841cb995
ER
640%if %{with doc}
641# HTML and XML-generated docs
642%doc DOCS/HTML/en
0ffd4cd0 643%lang(cs) %doc DOCS/HTML/cs
aeb67db6 644%lang(de) %doc DOCS/HTML/de
aee40e50 645%lang(es) %doc DOCS/HTML/es
646%lang(fr) %doc DOCS/HTML/fr
8cda16b8 647%lang(hu) %doc DOCS/HTML/hu
aee40e50 648%lang(pl) %doc DOCS/HTML/pl
649%lang(ru) %doc DOCS/HTML/ru
841cb995
ER
650#%lang(zh_CN) %doc DOCS/zh
651%endif
652%doc AUTHORS README
11421384 653
906bf13b
JB
654%dir %{_sysconfdir}/%{name}
655%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
2adea73e 656%{_mandir}/man1/*
59ba0205 657%lang(cs) %{_mandir}/cs/man1/*
20e1052d 658%lang(de) %{_mandir}/de/man1/*
aee40e50 659%lang(es) %{_mandir}/es/man1/*
2a9a2b75 660%lang(fr) %{_mandir}/fr/man1/*
daef2f4a 661%lang(hu) %{_mandir}/hu/man1/*
8cda16b8 662%lang(it) %{_mandir}/it/man1/*
2a6ed516 663%lang(pl) %{_mandir}/pl/man1/*
841cb995 664#%lang(sv) %{_mandir}/sv/man1/*
53f97285 665#%lang(zh_CN) %{_mandir}/zh_CN/man1/*
24481cd2 666%{_desktopdir}/mplayer.desktop
1087e996 667%{_pixmapsdir}/mplayer.png
11421384
ER
668%dir %{_datadir}/%{name}
669%{_datadir}/%{name}/font*
59ce39fb
ER
670%dir %{_datadir}/%{name}/skins
671%ghost %{_datadir}/%{name}/skins/default
This page took 0.220291 seconds and 4 git commands to generate.