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