]> git.pld-linux.org Git - packages/mplayer2.git/blame - mplayer2.spec
- fix building with libdvdnav 5.x
[packages/mplayer2.git] / mplayer2.spec
CommitLineData
26692d73 1#
e24f026c
BZ
2%bcond_with directfb # with DirectFB video output
3%bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
4%bcond_with ggi # with ggi video output
5%bcond_with nas # with NAS audio output
6%bcond_with svga # with svgalib video output
7%bcond_without osd # with osd menu support
8%bcond_without altivec # without altivec support
9%bcond_without x264 # without x264 support
10%bcond_with xmms # with XMMS inputplugin support
11%bcond_without aalib # without aalib video output
12%bcond_without jack # without JACKD support
13%bcond_without alsa # without ALSA audio output
14%bcond_with arts # with arts audio output
15%bcond_without caca # without libcaca video output
16%bcond_without cdparanoia # without cdparanoia support
17%bcond_without dvdnav # without dvdnav support
18%bcond_without enca # disable using ENCA charset oracle library
19%bcond_with esd # enable EsounD sound support
20%bcond_without faad # disable FAAD2 (AAC) support
21%bcond_without gif # disable GIF support
22%bcond_without gui # without GTK+ GUI
23%bcond_without joystick # disable joystick support
24%bcond_without libdts # disable libdts support
25%bcond_without libdv # disable libdv en/decoding support
26%bcond_without lirc # without lirc support
f093a67e 27%bcond_with live # without LIVE555 libraries
e24f026c
BZ
28%bcond_without lzo # with LZO support (requires lzo 2.x)
29%bcond_without mad # without mad (audio MPEG) support
30%bcond_without pulseaudio # without pulseaudio output
31%bcond_without quicktime # without binary quicktime dll support
32%bcond_without real # without Real* 8/9 codecs support
33%bcond_without runtime # disable runtime cpu detection, just detect CPU
34 # in compile time (advertised by mplayer authors as working faster); in this case
35 # mplayer may not work on machine other then where it was compiled
36%bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
37%bcond_without smb # disable Samba (SMB) input support
38%bcond_without theora # without theora support
39%bcond_without win32 # without win32 codecs support
40%bcond_without vdpau # disable vdpau
41%bcond_without vidix # disable vidix
42%bcond_without vorbis # without Ogg-Vorbis audio support
43%bcond_with system_vorbis # use system libvorbis instead of internal tremor
44%bcond_without xvid # disable XviD codec
45%bcond_without mencoder # disable mencoder (a/v encoder) compilation
46%bcond_without sdl # disable SDL
47%bcond_without doc # don't build docs (slow)
e24f026c
BZ
48%bcond_without amr # enable Adaptive Multi Rate (AMR) speech codec support
49%bcond_without gnomess # disable controling gnome screensaver
50%bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
51%bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer)
52%bcond_with on2 # with patches from On2 Flix Engine for Linux
53
75937e72
BZ
54%bcond_with nonfree # non free options of package
55%bcond_without va # VAAPI (Video Acceleration API)
56%bcond_without vpx # VP8, a high-quality video codec
26692d73 57
26692d73
BZ
58Summary: MPlayer - THE Movie Player for UN*X
59Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
60Summary(es.UTF-8): Otro reproductor de películas
61Summary(ko.UTF-8): 리눅스용 미디어플레이어
62Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
63Summary(pt_BR.UTF-8): Reprodutor de filmes
64Name: mplayer2
65Version: 2.0
9814f60e 66Release: 17
26692d73
BZ
67License: GPL
68Group: Applications/Multimedia
075c6208
JR
69Source0: http://ftp.mplayer2.org/pub/release/%{name}-build-%{version}.tar.xz
70# Source0-md5: 05b93784de995235e2758f182de15f73
f093a67e 71Patch0: format-security.patch
9814f60e 72Patch1: libdvdnav5.patch
26692d73
BZ
73URL: http://www.mplayer2.org/
74BuildRequires: OpenAL-devel
75BuildRequires: OpenGL-devel
76%{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
77%{?with_aalib:BuildRequires: aalib-devel}
78%{?with_alsa:BuildRequires: alsa-lib-devel}
79%{?with_arts:BuildRequires: artsc-devel}
80%{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
81%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
82BuildRequires: dirac-devel
83%{?with_doc:BuildRequires: docbook-dtd412-xml}
84%{?with_doc:BuildRequires: docbook-style-xsl}
85%{?with_dxr3:BuildRequires: em8300-devel}
86%{?with_enca:BuildRequires: enca-devel}
87%{?with_esd:BuildRequires: esound-devel}
88BuildRequires: faac-devel
89%{?with_faad:BuildRequires: faad2-devel >= 2.0}
90%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3}
91BuildRequires: freetype-devel >= 2.0.9
92BuildRequires: fribidi-devel
93BuildRequires: tar >= 1:1.22
94%{?with_vidix:BuildRequires: vidix-devel}
95%{?with_altivec:BuildRequires: gcc >= 5:4.1}
96%{?with_gnomess:BuildRequires: dbus-glib-devel}
97%{?with_gif:BuildRequires: giflib-devel}
98%{?with_gui:BuildRequires: gtk+2-devel}
99%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
26692d73
BZ
100BuildRequires: lame-libs-devel
101%{?with_caca:BuildRequires: libcaca-devel}
b6682862 102BuildRequires: libdc1394-devel
26692d73
BZ
103%{?with_libdts:BuildRequires: libdts-devel}
104%{?with_libdv:BuildRequires: libdv-devel > 0.9.5}
105%{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3}
106%{?with_ggi:BuildRequires: libggi-devel}
107BuildRequires: libjpeg-devel
108%{?with_mad:BuildRequires: libmad-devel}
109BuildRequires: libmng-devel
110BuildRequires: libmpcdec-devel >= 1.2.1
111BuildRequires: libpng-devel
112%{?with_smb:BuildRequires: libsmbclient-devel}
113%{?with_theora:BuildRequires: libtheora-devel}
114%{?with_vdpau:BuildRequires: libvdpau-devel}
b6682862 115BuildRequires: libvorbis-devel
1cabc2ac 116%{?with_vpx:BuildRequires: libvpx-devel >= 0.9.1}
26692d73 117%{?with_system_vorbis:BuildRequires: libvorbis-devel}
1cabc2ac 118%{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20110327}
26692d73
BZ
119BuildRequires: libxslt-progs
120%{?with_lirc:BuildRequires: lirc-devel}
121%{?with_live:BuildRequires: live-devel}
122%{?with_lzo:BuildRequires: lzo-devel >= 2.0}
123%{?with_nas:BuildRequires: nas-devel}
124BuildRequires: ncurses-devel
125%{?with_amr:BuildRequires: opencore-amr-devel}
b6682862 126BuildRequires: openjpeg-devel
26692d73
BZ
127BuildRequires: pkgconfig
128%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
b6682862 129BuildRequires: python-modules
26692d73
BZ
130BuildRequires: rpm >= 4.4.9-56
131BuildRequires: rpmbuild(macros) >= 1.527
132BuildRequires: schroedinger-devel
133BuildRequires: speex-devel >= 1.1
134%{?with_svga:BuildRequires: svgalib-devel}
135BuildRequires: twolame-devel
136%{?with_xmms:BuildRequires: xmms-devel}
137%{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
138%ifarch %{ix86} %{x8664}
139BuildRequires: yasm
140%endif
141BuildRequires: zlib-devel
142BuildRequires: xorg-lib-libX11-devel
143BuildRequires: xorg-lib-libXScrnSaver-devel
144BuildRequires: xorg-lib-libXext-devel
145BuildRequires: xorg-lib-libXinerama-devel
146BuildRequires: xorg-lib-libXv-devel
147BuildRequires: xorg-lib-libXvMC-devel
148BuildRequires: xorg-lib-libXxf86dga-devel
149BuildRequires: xorg-lib-libXxf86vm-devel
26692d73
BZ
150Requires: OpenGL
151BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
152
153%define _noautoreqdep libGL.so.1 libGLU.so.1
154%define specflags_ia32 -fomit-frame-pointer
155%if %{with altivec}
156%define specflags_ppc -maltivec
157%endif
158
159%description
160Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
161AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
162MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
163MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
164devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
165optionally with SHM extension, X11 using overlays with the Xvideo
166extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
167Voodoo2/3 hardware, SDL v1.1.7 driver etc.
168
169If you want to use win32 codecs install w32codec package.
170
171%description -l de.UTF-8
172MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
173Kennzeichnend ist die herausragende Format- und
174Plattform-Kompatibilität.
175
176Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
177plattformexklusive, wodurch etwa Windows Media auch außerhalb von
178Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
179Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
180ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
181Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
182installierte Codecs nicht mit MPlayer kollidieren können.
183
184%description -l es.UTF-8
185Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
186MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
187(uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
188de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
189Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
190G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
191overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
192G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
193v1.1.7 etc.
194
195Si quiere usar codecs Win32, instale el paquete w32codec.
196
197%description -l ko.UTF-8
198MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
199파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
200MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
201Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
202(Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
203수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
204크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
205있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
206부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
207
208%description -l pl.UTF-8
209Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
210RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
211(nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
212Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
213Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
214rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
215G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
216
217Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
218
219%description -l pt_BR.UTF-8
220MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
221áudio. Diferentes mecanismos de reprodução podem também ser
222escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
223
224%prep
785c4ef6 225%setup -q -n %{name}-build-%{version}
f093a67e 226%patch0 -p1
9814f60e 227%patch1 -p1
26692d73 228
75937e72
BZ
229# set ffmpeg options:
230echo " --arch=%{_target_base_arch}" >>ffmpeg_options
75937e72 231echo " --cc="%{__cc}"" >>ffmpeg_options
3c9880ec 232echo " --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags} -I/usr/include/openjpeg-1.5"" >>ffmpeg_options
75937e72
BZ
233echo " --extra-ldflags="%{rpmcflags} %{rpmldflags}"" >>ffmpeg_options
234echo " --disable-debug" >>ffmpeg_options
235echo " --disable-optimizations" >>ffmpeg_options
236echo " --disable-stripping" >>ffmpeg_options
237echo " --enable-avfilter" >>ffmpeg_options
238echo " --enable-gpl" >>ffmpeg_options
239echo " --enable-version3" >>ffmpeg_options
240echo " --enable-libdc1394" >>ffmpeg_options
241echo " --enable-libdirac" >>ffmpeg_options
242#echo " --enable-libfaad" >>ffmpeg_options
243#echo " --enable-libfaadbin" >>ffmpeg_options
244# no libgsm-devel
245#echo " --enable-libgsm" >>ffmpeg_options
246echo " --enable-libmp3lame" >>ffmpeg_options
247echo " --enable-libschroedinger" >>ffmpeg_options
248echo " --enable-libspeex" >>ffmpeg_options
249echo " --enable-libtheora" >>ffmpeg_options
250echo " --enable-libvorbis" >>ffmpeg_options
251echo " %{?with_vpx:--enable-libvpx}" >>ffmpeg_options
2292c031
BZ
252# x264 API >= 0.99
253echo " --enable-libx264" >>ffmpeg_options
75937e72
BZ
254echo " --enable-libxvid" >>ffmpeg_options
255echo " --enable-libopencore-amrnb" >>ffmpeg_options
256echo " --enable-libopencore-amrwb" >>ffmpeg_options
257echo " --enable-libopenjpeg" >>ffmpeg_options
258echo " --enable-postproc" >>ffmpeg_options
259echo " --enable-pthreads" >>ffmpeg_options
260echo " --enable-swscale" >>ffmpeg_options
261echo " --enable-vdpau" >>ffmpeg_options
262echo " --enable-x11grab" >>ffmpeg_options
263%ifnarch %{ix86} %{x8664}
264echo " --disable-mmx" >>ffmpeg_options
265%endif
4fdcb1c4
BZ
266#% ifarch i386 i486
267#echo " --disable-mmx" >>ffmpeg_options
268#% endif
75937e72
BZ
269%if %{with nonfree}
270echo " --enable-nonfree" >>ffmpeg_options
271echo " --enable-libfaac" >>ffmpeg_options
272%endif
c3dd5ef9 273echo " %{__enable_disable runtime runtime-cpudetect}" >>ffmpeg_options
75937e72
BZ
274
275# set mplayer options:
276echo " --prefix=%{_prefix}" >>mplayer_options
e24f026c
BZ
277echo " --confdir=%{_sysconfdir}/mplayer" >>mplayer_options
278echo " --cc="%{__cc}"" >>mplayer_options
279echo " --extra-cflags="$CFLAGS"" >>mplayer_options
280#echo " --real-ldflags="%{rpmldflags}"" >>mplayer_options
999fff7e 281echo " --extra-ldflags="%{?_x_libraries:-L%{_x_libraries}} -lX11 -lXext"" >>mplayer_options
e24f026c
BZ
282%if %{with system_ffmpeg}
283echo " --disable-libavutil_a" >>mplayer_options
284echo " --disable-libavcodec_a" >>mplayer_options
285echo " --disable-libavformat_a" >>mplayer_options
286echo " --disable-libpostproc_a" >>mplayer_options
287echo " --enable-libavutil_so" >>mplayer_options
288echo " --enable-libavcodec_so" >>mplayer_options
289echo " --enable-libavformat_so" >>mplayer_options
290echo " --enable-libpostproc_so" >>mplayer_options
291%endif
292%ifnarch %{ix86} %{x8664}
293echo " --disable-mmx" >>mplayer_options
294echo " --disable-mmxext" >>mplayer_options
295echo " --disable-3dnow" >>mplayer_options
296echo " --disable-3dnowext" >>mplayer_options
297echo " --disable-sse" >>mplayer_options
298echo " --disable-sse2" >>mplayer_options
299echo " --disable-fastmemcpy" >>mplayer_options
300%endif
301echo " %{__disable ssse3}" >>mplayer_options
302#echo " %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb}" >>mplayer_options
303echo " %{__enable_disable directfb}" >>mplayer_options
304echo " %{__disable dxr3}" >>mplayer_options
305echo " %{__disable ggi}" >>mplayer_options
306echo " %{__disable live}" >>mplayer_options
307echo " %{__disable lzo liblzo}" >>mplayer_options
308echo " %{__disable nas}" >>mplayer_options
309echo " %{__disable svga}" >>mplayer_options
310echo " %{__disable aalib aa}" >>mplayer_options
311echo " %{__disable jack}" >>mplayer_options
312echo " %{__enable_disable alsa}" >>mplayer_options
313echo " %{__disable arts}" >>mplayer_options
314echo " %{__disable caca}" >>mplayer_options
315echo " %{__disable cdparanoia}" >>mplayer_options
316echo " %{__disable enca}" >>mplayer_options
317echo " %{__disable esd}" >>mplayer_options
318echo " %{__disable faad}" >>mplayer_options
319echo " %{__disable gif}" >>mplayer_options
320echo " %{__enable joystick}" >>mplayer_options
321echo " %{__disable libdv}" >>mplayer_options
322echo " %{__disable libdts libdca}" >>mplayer_options
323echo " %{__enable_disable lirc}" >>mplayer_options
324echo " %{__disable mad}" >>mplayer_options
325echo " %{__disable pulseaudio pulse}" >>mplayer_options
326echo " %{__disable quicktime qtx}" >>mplayer_options
327echo " %{__disable real}" >>mplayer_options
328echo " %{__enable_disable runtime runtime-cpudetection}" >>mplayer_options
329echo " %{__disable select}" >>mplayer_options
330echo " %{__disable smb}" >>mplayer_options
331echo " %{__disable win32 win32dll}" >>mplayer_options
332echo " %{__disable vorbis tremor-internal} --disable-tremor %{__disable vorbis libvorbis}" >>mplayer_options
333echo " %{__disable_if system_vorbis tremor-internal}" >>mplayer_options
334echo " %{__enable osd menu}" >>mplayer_options
335echo " %{__disable theora}" >>mplayer_options
336echo " %{__disable x264}" >>mplayer_options
337echo " %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}}" >>mplayer_options
338echo " %{__disable xvid}" >>mplayer_options
339echo " %{__disable vidix}" >>mplayer_options
340echo " %{__disable vdpau}" >>mplayer_options
341echo " %{__disable mencoder}" >>mplayer_options
342echo " --enable-dga1" >>mplayer_options
343echo " --enable-dga2" >>mplayer_options
344echo " %{__enable_disable dvdnav}" >>mplayer_options
345echo " --enable-fbdev" >>mplayer_options
346echo " --enable-gl" >>mplayer_options
347echo " --enable-mga" >>mplayer_options
348echo " --enable-radio" >>mplayer_options
349echo " --enable-radio-capture" >>mplayer_options
350echo " %{__enable_disable sdl}" >>mplayer_options
351echo " --enable-tdfxfb" >>mplayer_options
352echo " --enable-vm" >>mplayer_options
353echo " --enable-x11" >>mplayer_options
354echo " --enable-xmga" >>mplayer_options
355echo " --enable-xv" >>mplayer_options
356echo " --enable-xvmc" >>mplayer_options
357echo " --with-xvmclib=XvMCW" >>mplayer_options
358#echo " --enable-zr" >>mplayer_options
359echo " --enable-unrarexec" >>mplayer_options
360echo " --enable-dynamic-plugins" >>mplayer_options
361echo " --enable-largefiles" >>mplayer_options
362echo " --language=all" >>mplayer_options
363echo " --codecsdir=%{_libdir}/codecs" >>mplayer_options
d9c27da3 364
26692d73
BZ
365cat mplayer/etc/example.conf > mplayer/etc/mplayer.conf
366cat <<'CONFIGADD' >> mplayer/etc/mplayer.conf
367
368######################
369# PLD Linux Defaults #
370######################
371[default]
372
373# alternate solution for CP1250-encoded subtitles
374fontconfig = yes
375subcp = cp1250
376
377# ...or if you prefer native bitmap fonts shipped with mplayer
378#fontconfig = no
379#subcp = iso-8859-1
380
381# Standard location
382unrarexec = "%{_bindir}/unrar"
383
384CONFIGADD
385
386%build
387%{__make}
388
389%install
390rm -rf $RPM_BUILD_ROOT
d9c27da3 391install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer}
26692d73 392
d9c27da3 393%{__make} install DESTDIR=$RPM_BUILD_ROOT
26692d73 394
d9c27da3
BZ
395mv -f $RPM_BUILD_ROOT%{_bindir}/{mplayer,%{name}}
396# default config files
397#install mplayer/etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
26692d73
BZ
398
399# fonts
d9c27da3
BZ
400#cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
401#ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
26692d73 402
d9c27da3
BZ
403#install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
404#install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
26692d73
BZ
405
406%clean
407rm -rf $RPM_BUILD_ROOT
408
409%files
410%defattr(644,root,root,755)
d9c27da3 411%attr(755,root,root) %{_bindir}/%{name}
This page took 0.102266 seconds and 4 git commands to generate.