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