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