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