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