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