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