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