]> git.pld-linux.org Git - packages/mplayer.git/blob - mplayer.spec
- TODO note
[packages/mplayer.git] / mplayer.spec
1 #
2 # TODO:
3 # - use external lrmi and few other libs:
4 #   http://www.gocyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm
5 #
6 # Conditional build:
7 %bcond_with     directfb        # with DirectFB video output
8 %bcond_with     divx4linux      # with divx4linux a/v support (binaries, instead
9                                 #  of included OpenDivx)
10
11 %bcond_with     dxr3            # enable use of DXR3/H+ hardware MPEG decoder
12 %bcond_with     ggi             # with ggi video output
13 %bcond_with     live            # enable use of live.com libraries
14 %bcond_with     nas             # with NAS audio output
15 %bcond_with     svga            # with svgalib video output
16 %bcond_with     osd             # with osd menu support
17
18 %bcond_with     altivec         # with altivec support (won't run w/o altivec
19                                 # due to instruction used in CPU detection(?))
20
21 %bcond_with     xmms            # with XMMS inputplugin support
22
23 %bcond_without  aalib           # without aalib video output
24 %bcond_without  jack            # without JACKD support
25 %bcond_without  alsa            # without ALSA audio output
26 %bcond_without  arts            # without arts audio output
27 %bcond_without  caca            # without libcaca video output
28 %bcond_without  dshow           # disable DirectShow support
29 %bcond_without  gui             # without GTK+ GUI
30 %bcond_without  joystick        # disable joystick support
31 %bcond_without  libdv           # disable libdv en/decoding support
32 %bcond_without  lirc            # without lirc support
33 %bcond_without  mad             # without mad (audio MPEG) support
34 %bcond_without  polyp           # without polyp audio output
35 %bcond_without  quicktime       # without binary quicktime dll support
36 %bcond_without  real            # without Real* 8/9 codecs support
37 %bcond_without  runtime         # disable runtime cpu detection, just detect CPU
38                                 #  in compile time (advertised by mplayer
39                                 #  authors as working faster); in this case
40                                 #  mplayer may not work on machine other then
41                                 #  where it was compiled
42 %bcond_without  select          # disable audio select() support (for example
43                                 # required this option ALSA or Vortex2 driver)
44 %bcond_without  smb             # disable Samba (SMB) input support
45 %bcond_without  theora          # without theora support
46 %bcond_without  win32           # without win32 codecs support
47 %bcond_without  vorbis          # without Ogg-Vorbis audio support
48 %bcond_without  mencoder        # disable mencoder (a/v encoder) compilation
49 %bcond_without  libdts          # disable libdts support
50
51 %bcond_with     gtk2            # EXPERIMENTAL support for GTK+ version 2
52 %bcond_with     xlibs
53
54 %ifnarch %{ix86}
55 %undefine       with_win32
56 %undefine       with_quicktime
57 %endif
58
59 # set it to 0, or 1
60 %define         snapshot        0
61
62 %define         sname           MPlayer
63 %define         snap            %{nil}
64
65 %define         pre             pre7
66
67 Summary:        Yet another movie player
68 Summary(es):    Otro reproductor de películas
69 Summary(ko):    ¸®´ª½º¿ë ¹Ìµð¾îÇ÷¹À̾î
70 Summary(pl):    Jeszcze jeden odtwarzacz filmów
71 Summary(pt_BR): Reprodutor de filmes
72 Name:           mplayer
73 Version:        1.0
74 Release:        1.%{pre}.1
75 Epoch:          2
76 License:        GPL
77 Group:          X11/Applications/Multimedia
78 %if %{snapshot}
79 #Source0:       ftp://ftp1.mplayerhq.hu/%{sname}/cvs/%{sname}-%{snap}.tar.bz2
80 #Source0:       %{name}-%{snap}.tar.bz2
81 #Source1:       libavcodec-%{snap}.tar.bz2
82 %else
83 Source0:        ftp://ftp1.mplayerhq.hu/%{sname}/releases/%{sname}-%{version}%{pre}.tar.bz2
84 # Source0-md5:  5fadd6957d3aab989cd760ff38fb8fdf
85 %endif
86 Source3:        ftp://ftp1.mplayerhq.hu/%{sname}/releases/fonts/font-arial-iso-8859-2.tar.bz2
87 # Source3-md5:  7b47904a925cf58ea546ca15f3df160c
88 Source4:        ftp://ftp1.mplayerhq.hu/%{sname}/Skin/Blue-1.4.tar.bz2
89 # Source4-md5:  05dd8e4f11a715c9e5d2abf1cdeb907c
90 Source5:        g%{name}.desktop
91 Source6:        ftp://ftp1.mplayerhq.hu/%{sname}/releases/fonts/font-arial-iso-8859-1.tar.bz2
92 # Source6-md5:  1ecd31d17b51f16332b1fcc7da36b312
93 Source7:        %{name}.png
94 Source8:        %{name}.desktop
95 Patch0:         %{name}-no_libnsl.patch
96 Patch1:         %{name}-cp1250-fontdesc.patch
97 Patch2:         %{name}-codec.patch
98 Patch3:         %{name}-home_etc.patch
99 Patch4:         %{name}-350.patch
100 Patch5:         %{name}-configure.patch
101 Patch6:         %{name}-gtk+2.patch
102 Patch7:         %{name}-alpha.patch
103 Patch8:         %{name}-altivec.patch
104 Patch9:         %{name}-assembly.patch
105 Patch10:        %{name}-pcmsplit.patch
106 Patch11:        %{name}-bio2jack.patch
107 URL:            http://www.mplayerhq.hu/
108 %{?with_directfb:BuildRequires: DirectFB-devel}
109 BuildRequires:  OpenGL-devel
110 BuildRequires:  SDL-devel >= 1.1.7
111 %if %{with xlibs}
112 BuildRequires:  libXv-devel
113 %else
114 BuildRequires:  XFree86-devel >= 4.0.2
115 %endif
116 %{?with_aalib:BuildRequires:    aalib-devel}
117 %{?with_alsa:BuildRequires:     alsa-lib-devel}
118 %{?with_arts:BuildRequires:     artsc-devel}
119 BuildRequires:  audiofile-devel
120 BuildRequires:  cdparanoia-III-devel
121 %{?with_divx4linux:BuildRequires:       divx4linux-devel >= 1:5.01.20020418}
122 BuildRequires:  docbook-style-xsl
123 %{?with_dxr3:BuildRequires:     em8300-devel}
124 BuildRequires:  enca-devel
125 BuildRequires:  esound-devel
126 BuildRequires:  faad2-devel >= 2.0
127 BuildRequires:  freetype-devel
128 %ifarch ppc
129 %{?with_altivec:BuildRequires:  gcc >= 5:3.3.2-3}
130 %endif
131 %if %{with gui}
132 BuildRequires:  gtk+%{?with_gtk2:2}-devel
133 %endif
134 BuildRequires:  lame-libs-devel
135 %{?with_jack:BuildRequires:     libbio2jack-devel}
136 %{?with_caca:BuildRequires:     libcaca-devel}
137 %{?with_libdts:BuildRequires:   libdts-devel}
138 %{?with_libdv:BuildRequires:    libdv-devel}
139 %{?with_ggi:BuildRequires:      libggi-devel}
140 BuildRequires:  libjpeg-devel
141 %{?with_mad:BuildRequires:      libmad-devel}
142 BuildRequires:  libpng-devel
143 %{?with_smb:BuildRequires:      libsmbclient-devel}
144 %{?with_dshow:BuildRequires:    libstdc++-devel}
145 %{?with_theora:BuildRequires:   libtheora-devel}
146 %{?with_vorbis:BuildRequires:   libvorbis-devel}
147 BuildRequires:  libungif-devel
148 BuildRequires:  libxslt-progs
149 %{?with_lirc:BuildRequires:     lirc-devel}
150 %{?with_live:BuildRequires:     live}
151 BuildRequires:  lzo-devel
152 %{?with_nas:BuildRequires:      nas-devel}
153 BuildRequires:  ncurses-devel
154 %{?with_polyp:BuildRequires:    polypaudio-devel}
155 %{?with_svga:BuildRequires:     svgalib-devel}
156 %{?with_xmms:BuildRequires:     xmms-libs}
157 BuildRequires:  xvid-devel >= 1:0.9.0
158 BuildRequires:  zlib-devel
159 Requires(post,postun):  /sbin/ldconfig
160 Requires:       OpenGL
161 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
162
163 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
164 %define         specflags       -fomit-frame-pointer
165 %define         specflags_alpha -mmax
166 %if %{with altivec}
167 %define         specflags_ppc   -maltivec -mabi=altivec
168 %endif
169
170 %description
171 Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
172 AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
173 MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
174 MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
175 devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
176 optionally with SHM extension, X11 using overlays with the Xvideo
177 extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
178 Voodoo2/3 hardware, SDL v1.1.7 driver etc.
179
180 If you want to use win32 codecs install w32codec package.
181
182 %description -l es
183 Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
184 MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
185 (uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
186 de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
187 Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
188 G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
189 overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
190 G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
191 v1.1.7 etc.
192
193 Si quiere usar codecs Win32, instale el paquete w32codec.
194
195 %description -l ko
196 MPlayer´Â ¸®´ª½º¿ë ¹«ºñÇ÷¹À̾îÀÔ´Ï´Ù. ´ëºÎºÐÀÇ mpeg, avi ±×¸®°í asf
197 ÆÄÀÏÀ» Àç»ýÇÕ´Ï´Ù. VCD, DVD, ½É Áö¾î DivX±îÁö º¼ ¼ö ÀÖ½À´Ï´Ù.
198 MPlayerÀÇ ¶Ç ´Ù¸¥ Å« Æ¯Â¡Àº Ãâ·Â µå¶óÀ̹ö°¡ ´Ù¾çÇϴٴ °ÍÀÔ´Ï´Ù. X11,
199 Xv, DGA, OpenGL, SVGAlib, fbdev¿Í ÀÛµ¿Çϸç, SDLÀ̳ª
200 (Matrox/3dfx/SisµîÀÇ) Æ¯Á¤ Ä«µå¿¡ Á¾¼ÓµÈ ·Î¿ì·¹ º§ µå¶óÀ̹öµéµµ »ç¿ëÇÒ
201 ¼ö ÀÖ½À´Ï´Ù. ´ëºÎºÐÀÇ Ãâ·Â µå¶óÀ̹öµéÀº ¼ÒÇÁÆ®¿þ¾î È¤Àº Çϵå¿þ¾îÀûÀÎ
202 Å©±âÁ¶Àý (scaling)À» Áö¿øÇϹǷÎ, Àüüȭ¸éÀ¸·Î ¿µ»óÀ» °¨»óÇÒ ¼ö
203 ÀÖ½À´Ï´Ù. »Ó¸¸¾Æ´Ï¶ó, Çѱ¹¾î, ¿µ¾î, Çë°¡¸®¾î, Ã¼ÄÚ¾î, ·¯½Ã¾Æ¾îµîÀÇ
204 ºÎµå·¯¿î(antialiased) ÀÚ¸·ÆùÆ®µµ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
205
206 %description -l pl
207 Odtwarzacz wideo. Wspierane formaty wej¶ciowe: VCD (VideoCD), MPEG1/2,
208 RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
209 (nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
210 Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
211 Wspierane urz±dzenia wyj¶ciowe: Matrox G200/G400, X11 opcjonalnie z
212 rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
213 G400 u¿ywaj±c framebuffera, Voodoo2/3, SDL v1.1.7 itp.
214
215 Je¶li chcesz u¿ywaæ kodeków win32, zainstaluj pakiet w32codec.
216
217 %description -l pt_BR
218 MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
219 áudio. Diferentes mecanismos de reprodução podem também ser
220 escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
221
222 %prep
223 %if %{snapshot}
224 %setup -q -n %{name}-%{snap} -a 1 -a 3 -a 6
225 %else
226 %setup -q -n %{sname}-%{version}%{pre} -a 3 -a 6
227 %endif
228
229 cp -f etc/codecs.conf etc/codecs.win32.conf
230 %patch0 -p1
231 %patch1 -p0
232 ##%patch2 -p1
233 ##%patch3 -p1   -- old home_etc behavior
234 %patch4 -p1
235 %patch5 -p1
236 %if %{with gtk2}
237 %patch6 -p1
238 %endif
239 %patch7 -p1
240 %patch8 -p1
241 %patch9 -p1
242 #%%patch10 -p1
243 %patch11 -p1
244
245 # kill evil file, hackery not needed with llh
246 echo > osdep/kerneltwosix.h
247
248 find . -type d -name CVS -print | xargs rm -rf
249
250 %build
251 CFLAGS="%{rpmcflags}"
252 CC="%{__cc}"
253 export CC CFLAGS
254 ./configure \
255     --disable-gcc-checking \
256         --prefix=%{_prefix} \
257         --confdir=%{_sysconfdir}/mplayer \
258         --with-x11incdir=%{_prefix}/X11R6/include \
259         --with-extraincdir=%{_includedir}/xvid \
260 %ifnarch %{ix86}
261         --disable-mmx \
262         --disable-mmx2 \
263         --disable-3dnow \
264         --disable-3dnowex \
265         --disable-sse \
266         --disable-sse2 \
267         --disable-fastmemcpy \
268 %endif
269 %ifarch ppc
270 %{!?with_altivec:--disable-altivec} \
271 %endif
272 %{!?with_directfb:--disable-directfb} \
273 %{!?with_divx4linux:--disable-divx4linux} \
274 %{?with_divx4linux:--with-extraincdir=/usr/include/divx} \
275 %{!?with_dxr3:--disable-dxr3} \
276 %{!?with_ggi:--disable-ggi} \
277 %{?with_live:--enable-live --with-livelibdir=/usr/lib/liveMedia --with-extraincdir=/usr/include/liveMedia } \
278 %{!?with_live:--disable-live} \
279 %{!?with_nas:--disable-nas} \
280 %{!?with_svga:--disable-svga} \
281 %{!?with_aalib:--disable-aa} \
282 %{!?with_jack:--disable-jack} \
283 %{!?with_alsa:--disable-alsa} \
284 %{?with_alsa:--enable-alsa --disable-select} \
285 %{!?with_arts:--disable-arts} \
286 %{!?with_caca:--disable-caca} \
287 %{!?with_dshow:--disable-dshow} \
288 %{?with_gui:--enable-gui} \
289 %{?with_joystick:--enable-joystick} \
290 %{!?with_libdv:--disable-libdv} \
291 %{!?with_libdts:--disable-libdts} \
292 %{!?with_lirc:--disable-lirc} \
293 %{!?with_mad:--disable-mad} \
294 %{!?with_polyp:--disable-polyp} \
295 %{!?with_quicktime:--disable-qtx} \
296 %{!?with_real:--disable-real} \
297 %{!?with_runtime:--disable-runtime-cpudetection} \
298 %{?with_runtime:--enable-runtime-cpudetection} \
299 %{!?with_select:--disable-select} \
300 %{!?with_smb:--disable-smb} \
301 %{!?with_win32:--disable-win32} \
302 %{!?with_vorbis:--disable-vorbis} \
303 %{?with_osd:--enable-menu} \
304 %{!?with_theora:--disable-theora} \
305 %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
306 %{!?with_mencoder:--disable-mencoder} \
307         --enable-external-faad \
308         --enable-dga \
309         --enable-fbdev \
310         --enable-gl \
311         --enable-mga \
312         --enable-sdl \
313         --enable-tdfxfb \
314         --enable-vm \
315         --enable-x11 \
316         --enable-xmga \
317         --enable-xv \
318         --enable-xvmc \
319         --enable-xvid \
320         --enable-largefiles \
321         --language=all \
322         --with-codecsdir=%{_libdir}/codecs \
323         --enable-dynamic-plugins
324
325 %{__make}
326
327 %{__make} -C DOCS/xml
328
329 %install
330 rm -rf $RPM_BUILD_ROOT
331 install -d \
332         $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
333         $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
334         $RPM_BUILD_ROOT{%{_datadir}/mplayer/Skin,%{_libdir}/mplayer/vidix} \
335         $RPM_BUILD_ROOT%{_desktopdir}
336
337 # default config files
338 awk '/Delete this default/{a++};{if(!a){print}}' etc/example.conf > etc/mplayer.conf
339 install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
340
341 # executables
342 %if %{with mencoder}
343 install mencoder $RPM_BUILD_ROOT%{_bindir}
344 %endif
345 install mplayer $RPM_BUILD_ROOT%{_bindir}
346 ln -sf mplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer
347
348 # fonts
349 rm -f font-*/runme
350 cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
351 ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
352
353 # skin
354 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin
355 rm -rf $RPM_BUILD_ROOT%{_datadir}/mplayer/Skin/*/CVS
356
357 # libraries
358 %ifarch %{ix86}
359 install libdha/libdha.so.1.0 $RPM_BUILD_ROOT%{_libdir}
360 install vidix/drivers/*.so $RPM_BUILD_ROOT%{_libdir}/mplayer/vidix
361 %endif
362
363 # X-files
364 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
365 install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
366 install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
367
368 # man pages
369 install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
370 install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
371 install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
372 install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
373 install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
374 install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
375 install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
376 install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
377 install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
378 install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
379
380 %clean
381 rm -rf $RPM_BUILD_ROOT
382
383 %post
384 umask 022
385 /sbin/ldconfig
386 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
387
388 %postun
389 umask 022
390 /sbin/ldconfig
391 [ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1
392
393 %files
394 %defattr(644,root,root,755)
395 %doc DOCS/HTML/en/*.html DOCS/tech %{?with_win32:etc/codecs.win32.conf}
396 %lang(de) %doc DOCS/de
397 %lang(es) %doc DOCS/HTML/es
398 %lang(fr) %doc DOCS/HTML/fr
399 %lang(hu) %doc DOCS/HTML/hu
400 %lang(it) %doc DOCS/it
401 %lang(pl) %doc DOCS/HTML/pl
402 %lang(ru) %doc DOCS/HTML/ru
403 %lang(zh_CN) %doc DOCS/zh
404 %doc README AUTHORS ChangeLog
405 %attr(755,root,root) %{_bindir}/*
406 %ifarch %{ix86}
407 %attr(755,root,root) %{_libdir}/libdha.so.*.*
408 %attr(755,root,root) %{_libdir}/mplayer
409 %endif
410 %{_datadir}/mplayer
411 %dir %{_sysconfdir}/mplayer
412 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mplayer/*.conf
413 %{_mandir}/man1/*
414 %lang(cs) %{_mandir}/cs/man1/*
415 %lang(de) %{_mandir}/de/man1/*
416 %lang(es) %{_mandir}/es/man1/*
417 %lang(fr) %{_mandir}/fr/man1/*
418 %lang(hu) %{_mandir}/hu/man1/*
419 %lang(it) %{_mandir}/it/man1/*
420 %lang(pl) %{_mandir}/pl/man1/*
421 %lang(sv) %{_mandir}/sv/man1/*
422 %lang(zh_CN) %{_mandir}/zh_CN/man1/*
423 %if %{with gui}
424 %{_desktopdir}/gmplayer.desktop
425 %endif
426 %{_desktopdir}/mplayer.desktop
427 %{_pixmapsdir}/*
This page took 0.073624 seconds and 3 git commands to generate.