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