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