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