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