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