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