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