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