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