]> git.pld-linux.org Git - packages/mplayer.git/blame - mplayer.spec
- don't package skins/default symlink; rel 3
[packages/mplayer.git] / mplayer.spec
CommitLineData
5e37db9a 1# TODO:
8a72e936 2# - nut support (http://www.nut.hu/ - currently down, but see svn.mplayerhq.hu/nut/)
b8145877 3# - update for lzo 2
841cb995 4# - try to use external lrmi and few other libs:
4d75c49f 5# http://www.cyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm
bef18474
ER
6# - segfaults on amd64:
7# mencoder -oac pcm -af dummy -ovc raw -vf format=yv12 -of ogg -mc 0 -quiet -o /tmp/out1 l.avi
8# avi: RIFF (little-endian) data, AVI, 480 x 360, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
5e37db9a 9#
94cb018b 10# Conditional build:
8cc223f8 11%bcond_with directfb # with DirectFB video output
8cc223f8
JB
12%bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
13%bcond_with ggi # with ggi video output
8cc223f8
JB
14%bcond_with nas # with NAS audio output
15%bcond_with svga # with svgalib video output
16%bcond_with osd # with osd menu support
93ab9715 17%bcond_without altivec # without altivec support
d6014b54 18%bcond_without x264 # without x264 support
2af58a38 19%bcond_with xmms # with XMMS inputplugin support
8cc223f8 20%bcond_without aalib # without aalib video output
e5b91f83 21%bcond_without jack # without JACKD support
8cc223f8
JB
22%bcond_without alsa # without ALSA audio output
23%bcond_without arts # without arts audio output
dd153a0d 24%bcond_without caca # without libcaca video output
3c3fdfcc 25%bcond_without cdparanoia # without cdparanoia support
8cc223f8 26%bcond_without dshow # disable DirectShow support
3c3fdfcc
JB
27%bcond_without enca # disable using ENCA charset oracle library
28%bcond_without esd # disable EsounD sound support
29%bcond_without faad # disable FAAD2 (AAC) support
30%bcond_without gif # disable GIF support
8d7378f8 31%bcond_without gui # without GTK+ GUI
8cc223f8 32%bcond_without joystick # disable joystick support
3c3fdfcc 33%bcond_without libdts # disable libdts support
a4298e0c 34%bcond_without libdv # disable libdv en/decoding support
8cc223f8 35%bcond_without lirc # without lirc support
841cb995
ER
36%bcond_with live # without LIVE555 libraries
37%bcond_without lzo # with LZO support (requires lzo 2.x)
8cc223f8 38%bcond_without mad # without mad (audio MPEG) support
86bc294f 39%bcond_without pulseaudio # without pulseaudio output
8cc223f8
JB
40%bcond_without quicktime # without binary quicktime dll support
41%bcond_without real # without Real* 8/9 codecs support
42%bcond_without runtime # disable runtime cpu detection, just detect CPU
11421384
ER
43 # in compile time (advertised by mplayer authors as working faster); in this case
44 # mplayer may not work on machine other then where it was compiled
45%bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
a4298e0c 46%bcond_without smb # disable Samba (SMB) input support
de0c2d91 47%bcond_without theora # without theora support
8cc223f8 48%bcond_without win32 # without win32 codecs support
1087e996 49%bcond_without vidix # disable vidix
3b930ad6 50%bcond_without vorbis # without Ogg-Vorbis audio support
3c3fdfcc 51%bcond_without xvid # disable XviD codec
2af58a38 52%bcond_without mencoder # disable mencoder (a/v encoder) compilation
906bf13b 53%bcond_without sdl # disable SDL
aab7d90d 54%bcond_without doc # don't build docs (slow)
59a38ff4 55%bcond_with shared # experimental libmplayer.so support
439df4dd 56%bcond_with amr # enable 3GPP Adaptive Multi Rate (AMR) speech codec support
0256d486 57%bcond_without gnomess # disable controling gnome screensaver
841cb995 58%bcond_with ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
2dfabf36 59
94cb018b
JB
60%ifnarch %{ix86}
61%undefine with_win32
7a82c266 62%undefine with_quicktime
1087e996 63%undefine with_vidix
94cb018b
JB
64%endif
65
fdfd27e9 66%ifarch %{x8664} sparc sparc64
906bf13b
JB
67%undefine with_runtime
68%endif
1a8df7bd 69
70%if %{_lib} == "lib64"
71%define _suf 64
72%else
73%define _suf 32
74%endif
75
879e9f7b 76%define subver rc2
0566b89b 77%define rel 3
135255b8 78
906bf13b 79Summary: MPlayer - THE Movie Player for UN*X
eeb91a66
ER
80Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
81Summary(es.UTF-8): Otro reproductor de películas
82Summary(ko.UTF-8): 리눅스용 미디어플레이어
83Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
84Summary(pt_BR.UTF-8): Reprodutor de filmes
2adea73e 85Name: mplayer
9cb1ef87 86Version: 1.0
879e9f7b 87Release: 5.%{subver}.%{rel}
1f85fd72
ER
88# DO NOT increase epoch unless it's really neccessary!
89# especially such changes like pre7->pre7try2, increase Release instead!
90# PS: $ rpmvercmp pre7try2 pre7
91# pre7try2 > pre7
59476b48 92Epoch: 3
bc426a7f 93License: GPL
906bf13b 94Group: Applications/Multimedia
879e9f7b 95Source0: ftp://ftp2.mplayerhq.hu/MPlayer/releases/MPlayer-%{version}%{subver}.tar.bz2
841cb995 96# Source0-md5: 7e27e535c2d267637df34898f1b91707
031c3c7c 97Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
0a38bda8 98# Source3-md5: 7b47904a925cf58ea546ca15f3df160c
e601cd91 99Source5: g%{name}.desktop
623ea2d1 100Source6: ftp://ftp2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
0a38bda8 101# Source6-md5: 1ecd31d17b51f16332b1fcc7da36b312
11b89ef7 102Source7: %{name}.png
24481cd2 103Source8: %{name}.desktop
dfd680ce 104# http://www.on2.com/gpl/mplayer/
841cb995
ER
105Source9: http://www.on2.com/gpl/mplayer/2007-10-09-mencoder-on2flixenglinux.tar.bz2
106# Source9-md5: 2361e56b40f52dfc20131e458e2aed38
aee40e50 107Patch1: %{name}-cp1250-fontdesc.patch
879e9f7b
ER
108#Patch2: %{name}-codec.patch
109#Patch3: %{name}-home_etc.patch
aee40e50 110Patch4: %{name}-350.patch
111Patch5: %{name}-configure.patch
841cb995 112#Patch6: %{name}-system-amr.patch # outdated via ffmpeg?
8cc223f8 113Patch8: %{name}-altivec.patch
879e9f7b
ER
114#Patch10: %{name}-pcmsplit.patch
115#Patch13: %{name}-mythtv.patch
11421384 116Patch14: %{name}-shared.patch
30e3739f 117#http://www.openchrome.org/snapshots/mplayer/
879e9f7b 118#Patch15: %{name}-xvmc.patch
c7699e1b 119Patch17: %{name}-auto-expand.patch
841cb995 120#Patch18: %{name}-gnome-screensaver.patch # update
dfd680ce 121Patch19: %{name}-on2flix.patch
841cb995
ER
122Patch22: %{name}-ffmpeg.patch
123Patch23: %{name}-live.patch
2b6e0df5 124Patch24: %{name}-fontconfig_sub.patch
879e9f7b 125Patch25: http://www.mplayerhq.hu/MPlayer/patches/stream_cddb_fix_20080120.diff
c5b97685 126URL: http://www.mplayerhq.hu/
33c4efab 127%{?with_directfb:BuildRequires: DirectFB-devel}
aeb67db6 128BuildRequires: OpenAL-devel
b458005d 129BuildRequires: OpenGL-devel
11421384 130%{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
dd6c659c
JB
131%{?with_aalib:BuildRequires: aalib-devel}
132%{?with_alsa:BuildRequires: alsa-lib-devel}
e4268e0b
JB
133%if %{with amr}
134BuildRequires: amrnb-devel
4d75c49f 135BuildRequires: amrwb-devel >= 5.3.0
e4268e0b 136%endif
dd6c659c 137%{?with_arts:BuildRequires: artsc-devel}
841cb995 138%{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
3c3fdfcc 139%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
aab7d90d 140%{?with_doc:BuildRequires: docbook-style-xsl}
dd6c659c 141%{?with_dxr3:BuildRequires: em8300-devel}
3c3fdfcc
JB
142%{?with_enca:BuildRequires: enca-devel}
143%{?with_esd:BuildRequires: esound-devel}
30e3739f 144BuildRequires: faac-devel
3c3fdfcc 145%{?with_faad:BuildRequires: faad2-devel >= 2.0}
841cb995 146BuildRequires: ffmpeg-devel >= 0.4.9-3.20070626.1.1
d23c171d 147BuildRequires: freetype-devel
30e3739f 148BuildRequires: fribidi-devel
1087e996 149%{?with_vidix:BuildRequires: vidix-devel}
8cc223f8
JB
150%ifarch ppc
151%{?with_altivec:BuildRequires: gcc >= 5:3.3.2-3}
152%endif
3c3fdfcc 153%{?with_gif:BuildRequires: giflib-devel}
dd6c659c 154%if %{with gui}
aeb67db6 155BuildRequires: gtk+2-devel
dd6c659c 156%endif
1087e996 157%{?with_gnomess:BuildRequires: dbus-glib-devel}
d336e259 158%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
a8a0c1d1 159BuildRequires: lame-libs-devel
dd6c659c 160%{?with_caca:BuildRequires: libcaca-devel}
49aed190 161%{?with_libdts:BuildRequires: libdts-devel}
a4298e0c 162%{?with_libdv:BuildRequires: libdv-devel}
4d75c49f 163BuildRequires: libdvdnav-devel
dd6c659c 164%{?with_ggi:BuildRequires: libggi-devel}
af480c75 165BuildRequires: libjpeg-devel
dd6c659c 166%{?with_mad:BuildRequires: libmad-devel}
30e3739f 167BuildRequires: libmpcdec-devel >= 1.2.1
af480c75 168BuildRequires: libpng-devel
a4298e0c 169%{?with_smb:BuildRequires: libsmbclient-devel}
dd6c659c 170%{?with_dshow:BuildRequires: libstdc++-devel}
de0c2d91 171%{?with_theora:BuildRequires: libtheora-devel}
1130ecb8 172# tremor is used by default, internal as we don't have system one
281ac7d0 173#%{?with_vorbis:BuildRequires: libvorbis-devel}
a9052f4d 174%{?with_x264:BuildRequires: libx264-devel >= 0.1.2-1.20060828_2245.1}
ceb01d0e 175BuildRequires: libxslt-progs
dd6c659c
JB
176%{?with_lirc:BuildRequires: lirc-devel}
177%{?with_live:BuildRequires: live}
841cb995 178%{?with_lzo:BuildRequires: lzo-devel >= 2.0}
dd6c659c 179%{?with_nas:BuildRequires: nas-devel}
b458005d 180BuildRequires: ncurses-devel
e9d22b19 181BuildRequires: pkgconfig
86bc294f 182%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
aeb67db6 183BuildRequires: speex-devel >= 1.1
dd6c659c
JB
184%{?with_svga:BuildRequires: svgalib-devel}
185%{?with_xmms:BuildRequires: xmms-libs}
627a7a97
ER
186BuildRequires: xorg-lib-libX11-devel
187BuildRequires: xorg-lib-libXext-devel
188BuildRequires: xorg-lib-libXinerama-devel
189BuildRequires: xorg-lib-libXv-devel
190BuildRequires: xorg-lib-libXvMC-devel
191BuildRequires: xorg-lib-libXxf86dga-devel
192BuildRequires: xorg-lib-libXxf86vm-devel
3c3fdfcc 193%{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
c2eb8d00 194BuildRequires: zlib-devel
4d75c49f 195Requires: %{name}-common = %{epoch}:%{version}-%{release}
b458005d 196Requires: OpenGL
0f2a502d 197BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
2adea73e 198
a8e3a9a7 199%define _noautoreqdep libGL.so.1 libGLU.so.1
bb27cfbd 200%define specflags_ia32 -fomit-frame-pointer
198487b4 201%if %{with altivec}
adfd0023 202%define specflags_ppc -maltivec
20a66bdb 203%endif
2adea73e
AM
204
205%description
c902f7c6 206Movie player. Supported input formats: VCD (VideoCD), MPEG1/2, RIFF
207AVI, ASF 1.0, Quicktime. Supported audio codecs: PCM (uncompressed),
6db4b1ea 208MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Supported video codecs:
209MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX. Supported output
c902f7c6 210devices: Matrox G200/G400 hardware, Matrox G200/G400 overlay, X11
211optionally with SHM extension, X11 using overlays with the Xvideo
212extension, OpenGL renderer, Matrox G400 YUV support on framebuffer
213Voodoo2/3 hardware, SDL v1.1.7 driver etc.
2adea73e 214
8b146837 215If you want to use win32 codecs install w32codec package.
4228a246 216
e011d408 217%description -l de.UTF-8
deba608c 218MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player.
219Kennzeichnend ist die herausragende Format- und
e011d408 220Plattform-Kompatibilität.
deba608c 221
e011d408
JR
222Es unterstützt eine Vielzahl von Video und Audio-Codecs, darunter auch
223plattformexklusive, wodurch etwa Windows Media auch außerhalb von
224Windows wiedergegeben werden kann. Darüber hinaus unterstützt er DVB.
225Eine besondere Fehlertoleranz ermöglicht es dem mehrfach
deba608c 226ausgezeichneten Player, auch defekte Dateien abzuspielen. Eine weitere
e011d408
JR
227Stärke ist dabei der Wegfall jeglicher Installation, so dass bereits
228installierte Codecs nicht mit MPlayer kollidieren können.
deba608c 229
e011d408 230%description -l es.UTF-8
c902f7c6 231Reproductor video. Formatos de entrada soportados: VCD (VideoCD),
232MPEG1/2, RIFF AVI, ASF 1.0, Quicktime. Codecs de audio soportados: PCM
233(uncompressed), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM. Codecs
234de video soportados: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
235Dispositivos de salida soportados: Matrox G200/G400 hardware, Matrox
e011d408
JR
236G200/G400 overlay, X11 optionalmente con la extensión SHM, X11 usando
237overlays con la extensión Xvideo, plasmador OpenGL, soporte de Matrox
c902f7c6 238G400 YUV en hardware de framebuffer de Voodoo2/3, controlador SDL
239v1.1.7 etc.
33c4efab 240
8b146837 241Si quiere usar codecs Win32, instale el paquete w32codec.
33c4efab 242
e011d408
JR
243%description -l ko.UTF-8
244MPlayer는 리눅스용 무비플레이어입니다. 대부분의 mpeg, avi 그리고 asf
245파일을 재생합니다. VCD, DVD, 심 지어 DivX까지 볼 수 있습니다.
246MPlayer의 또 다른 큰 특징은 출력 드라이버가 다양하다는 것입니다. X11,
247Xv, DGA, OpenGL, SVGAlib, fbdev와 작동하며, SDL이나
248(Matrox/3dfx/Sis등의) 특정 카드에 종속된 로우레 벨 드라이버들도 사용할
249수 있습니다. 대부분의 출력 드라이버들은 소프트웨어 혹은 하드웨어적인
250크기조절 (scaling)을 지원하므로, 전체화면으로 영상을 감상할 수
251있습니다. 뿐만아니라, 한국어, 영어, 헝가리어, 체코어, 러시아어등의
252부드러운(antialiased) 자막폰트도 사용할 수 있습니다.
af480c75 253
e011d408
JR
254%description -l pl.UTF-8
255Odtwarzacz wideo. Wspierane formaty wejściowe: VCD (VideoCD), MPEG1/2,
c902f7c6 256RIFF AVI, ASF 1.0, Quicktime. Wspierane kodeki audio: PCM
257(nieskompresowane), MPEG layer 2/3, AC3, aLaw, MS-GSM, Win32 ACM.
258Wspierane kodeki wideo: MPEG 1 and MPEG 2, Win32 ICM (VfW), OpenDivX.
e011d408 259Wspierane urządzenia wyjściowe: Matrox G200/G400, X11 opcjonalnie z
c902f7c6 260rozszerzeniem SHM, X11 z rozszerzeniem Xvideo, renderer OpenGL, Matrox
e011d408 261G400 używając framebuffera, Voodoo2/3, SDL v1.1.7 itp.
2adea73e 262
e011d408 263Jeśli chcesz używać kodeków win32, zainstaluj pakiet w32codec.
4228a246 264
e011d408
JR
265%description -l pt_BR.UTF-8
266MPlayer é um reprodutor de filmes que suporta vários codecs de vídeo e
267áudio. Diferentes mecanismos de reprodução podem também ser
2abc285c 268escolhidos, incluindo SDL, SVGALib, frame buffer, aalib, X11 e outros.
269
11421384
ER
270%package -n gmplayer
271Summary: MPlayer with GTK+ GUI interface
eeb91a66 272Summary(pl.UTF-8): MPlayer z graficznym interfejsem GTK+
11421384 273Group: X11/Applications/Multimedia
11421384 274Requires: %{name}-common = %{epoch}:%{version}-%{release}
deba608c 275Requires: %{name}-skin
906bf13b 276Provides: %{name} = %{epoch}:%{version}-%{release}
11421384
ER
277
278%description -n gmplayer
279MPlayer with GUI GTK+ interface.
280
e011d408 281%description -n gmplayer -l pl.UTF-8
906bf13b
JB
282MPlayer z graficznym interfejsem GTK+.
283
11421384 284%package common
906bf13b 285Summary: Configuration files and documentation for MPlayer
eeb91a66 286Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera
11421384 287Group: Applications/Multimedia
1087e996 288Obsoletes: mplayer-vidix
11421384
ER
289
290%description common
906bf13b
JB
291Configuration files, man page and HTML documentation for MPlayer.
292
e011d408 293%description common -l pl.UTF-8
906bf13b 294Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
11421384
ER
295
296%package -n mencoder
906bf13b 297Summary: MEncoder - a movie encoder for Linux
eeb91a66 298Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa
11421384
ER
299Group: Applications/Multimedia
300Requires: %{name}-common = %{epoch}:%{version}-%{release}
301
302%description -n mencoder
906bf13b
JB
303MEncoder is a movie encoder for Linux and is a part of the MPlayer
304package.
305
e011d408
JR
306%description -n mencoder -l pl.UTF-8
307MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
11421384 308
2adea73e 309%prep
879e9f7b 310%setup -q -n MPlayer-%{version}%{subver} -a3 -a6 -a9
833dbe20 311cp -f etc/codecs.conf etc/codecs.win32.conf
aee40e50 312%patch1 -p0
879e9f7b 313#%patch2 -p1
aee40e50 314##%patch3 -p1 -- old home_etc behavior
315%patch4 -p1
dd6c659c 316%patch5 -p1
841cb995 317#%patch6 -p1 # - try ffmpeg
2dfabf36 318%patch8 -p1
2b8c25a3 319#%%patch10 -p1
aeb67db6 320#%patch13 -p1 # TODO
11421384
ER
321%if %{with shared}
322%patch14 -p1
323%endif
aeb67db6 324#%patch15 -p0 # TODO
c7699e1b 325%patch17 -p1
0256d486 326%if %{with gnomess}
841cb995 327#%patch18 -p1
0992d783 328%endif
59ba0205 329
dfd680ce
ER
330# on2flix
331cp -a mencoder-on2flixenglinux/new_files/libmpdemux/* libmpdemux
841cb995 332rm -f mencoder-on2flixenglinux/version.diff
dfd680ce
ER
333%patch19 -p1
334for a in mencoder-on2flixenglinux/*.diff; do
335 patch -p0 < $a
336done
337
841cb995
ER
338%patch22 -p1
339%patch23 -p1
2b6e0df5 340%patch24 -p0
879e9f7b
ER
341cd stream
342%patch25 -p0
343cd -
7c31e935 344
2adea73e 345%build
68dd28e8 346%if %{with shared}
11421384 347CFLAGS="%{rpmcflags} -fPIC"
68dd28e8
ER
348%else
349CFLAGS="%{rpmcflags}"
68dd28e8 350%endif
4ed9dec4 351CC="%{__cc}"
ce8a4f6d
JB
352LDFLAGS="%{rpmldflags}"
353export CC CFLAGS LDFLAGS
11421384
ER
354
355build() {
356set -x
357 ./configure \
358 %{?debug:--enable-debug=3} \
dd6c659c
JB
359 --prefix=%{_prefix} \
360 --confdir=%{_sysconfdir}/mplayer \
dd6c659c 361 --with-extraincdir=%{_includedir}/xvid \
841cb995 362 --with-extralibdir=%{_x_libraries} \
526c0e5d 363 --enable-menu \
841cb995
ER
364 --disable-libavutil_a \
365 --disable-libavcodec_a \
366 --disable-libavformat_a \
367 --disable-libpostproc_a \
368 --enable-libavutil_so \
369 --enable-libavcodec_so \
370 --enable-libavformat_so \
371 --enable-libpostproc_so \
57f87bc2 372%ifnarch %{ix86} %{x8664}
dd6c659c 373 --disable-mmx \
a14f4270 374 --disable-mmxext \
dd6c659c 375 --disable-3dnow \
a14f4270 376 --disable-3dnowext \
dd6c659c
JB
377 --disable-sse \
378 --disable-sse2 \
379 --disable-fastmemcpy \
dfeec30a 380%endif
841cb995 381 %{!?with_ssse3:--disable-ssse3} \
1837afdf 382%ifarch ppc
383%{!?with_altivec:--disable-altivec} \
384%endif
841cb995
ER
385%{!?with_amr:--disable-libamr_nb --disable-libamr_wb} \
386%{?with_amr:--enable-libamr_nb --enable-libamr_wb} \
6e0359a9 387%{?with_directfb:--enable-directfb} \
33c4efab 388%{!?with_directfb:--disable-directfb} \
33c4efab 389%{!?with_dxr3:--disable-dxr3} \
390%{!?with_ggi:--disable-ggi} \
841cb995 391%{?with_live:--enable-live --with-extraincdir=/usr/include/liveMedia} \
0f2c0aed 392%{!?with_live:--disable-live} \
b8145877 393%{!?with_lzo:--disable-liblzo} \
33c4efab 394%{!?with_nas:--disable-nas} \
395%{!?with_svga:--disable-svga} \
396%{!?with_aalib:--disable-aa} \
e5b91f83 397%{!?with_jack:--disable-jack} \
33c4efab 398%{!?with_alsa:--disable-alsa} \
399%{?with_alsa:--enable-alsa --disable-select} \
400%{!?with_arts:--disable-arts} \
dd153a0d 401%{!?with_caca:--disable-caca} \
3c3fdfcc 402%{!?with_cdparanoia:--disable-cdparanoia} \
33c4efab 403%{!?with_dshow:--disable-dshow} \
3c3fdfcc
JB
404%{!?with_enca:--disable-enca} \
405%{!?with_esd:--disable-esd} \
0ffd4cd0 406%{!?with_faad:--disable-faad-external --disable-faad-internal} \
407%{?with_faad:--disable-faad-internal} \
3c3fdfcc 408%{!?with_gif:--disable-gif} \
33c4efab 409%{?with_joystick:--enable-joystick} \
a4298e0c 410%{!?with_libdv:--disable-libdv} \
49aed190 411%{!?with_libdts:--disable-libdts} \
d8f32b56 412--%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
33c4efab 413%{!?with_mad:--disable-mad} \
4143807a 414%{!?with_pulseaudio:--disable-pulse} \
7a82c266 415%{!?with_quicktime:--disable-qtx} \
33c4efab 416%{!?with_real:--disable-real} \
11421384 417--%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection \
33c4efab 418%{!?with_select:--disable-select} \
a4298e0c 419%{!?with_smb:--disable-smb} \
841cb995 420%{!?with_win32:--disable-win32dll} \
33c4efab 421%{!?with_vorbis:--disable-vorbis} \
422%{?with_osd:--enable-menu} \
587f4971 423%{!?with_theora:--disable-theora} \
6a8a1010 424%{!?with_x264:--disable-x264} \
dd6c659c 425%{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
3c3fdfcc 426%{!?with_xvid:--disable-xvid} \
1087e996
ER
427%{!?with_vidix:--disable-vidix-external --disable-vidix-internal} \
428%{?with_vidix:--disable-vidix-internal} \
dd6c659c 429%{!?with_mencoder:--disable-mencoder} \
841cb995
ER
430 --enable-dga1 \
431 --enable-dga2 \
dd6c659c
JB
432 --enable-fbdev \
433 --enable-gl \
434 --enable-mga \
e7261209
KK
435 --enable-radio \
436 --enable-radio-capture \
11421384 437 --%{?with_sdl:en}%{!?with_sdl:dis}able-sdl \
dd6c659c
JB
438 --enable-tdfxfb \
439 --enable-vm \
440 --enable-x11 \
441 --enable-xmga \
442 --enable-xv \
443 --enable-xvmc \
3c3fdfcc 444 --enable-dynamic-plugins \
dd6c659c
JB
445 --enable-largefiles \
446 --language=all \
841cb995 447 --codecsdir=%{_libdir}/codecs \
3c3fdfcc 448 --with-xvmclib=XvMCW \
11421384 449 "$@"
eb52750a 450
11421384
ER
451 %{__make}
452}
2adea73e 453
11421384
ER
454%if %{with gui}
455# build GUI version
841cb995 456build --enable-gui --disable-mencoder
11421384 457mv -f mplayer gmplayer
aeb67db6 458%{__make} distclean
11421384
ER
459%endif
460
461# now build regular version
462build --disable-gui
463
aab7d90d 464%if %{with doc}
6eeeb8b4 465%{__make} -j1 -C DOCS/xml
11421384 466%endif
ceb01d0e 467
2adea73e
AM
468%install
469rm -rf $RPM_BUILD_ROOT
e0e4b963 470install -d \
d23c171d 471 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
59ba0205 472 $RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
dd20ae16 473 $RPM_BUILD_ROOT%{_datadir}/mplayer/skins \
59ba0205 474 $RPM_BUILD_ROOT%{_desktopdir}
2adea73e 475
e0e4b963 476# default config files
11421384 477sed -e '/Delete this default/d' etc/example.conf > etc/mplayer.conf
c455a752 478install etc/{codecs,mplayer%{?with_osd:,menu},input}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer
e0e4b963 479
480# executables
2af58a38 481%if %{with mencoder}
1a8df7bd 482install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
483ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
2af58a38 484%endif
1a8df7bd 485install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
486ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
11421384 487%if %{with gui}
1a8df7bd 488install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
489ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
11421384 490%endif
e0e4b963 491
492# fonts
9d62f689
TP
493rm -f font-*/runme
494cp -r font-* $RPM_BUILD_ROOT%{_datadir}/mplayer
6e933f9c 495ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
e0e4b963 496
11421384 497%if %{with gui}
dd20ae16 498ln -s Blue $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
f0d8c47e 499install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
68dd28e8 500%endif
24481cd2 501install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
11b89ef7 502install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
e0e4b963 503
504# man pages
59ba0205 505install DOCS/man/cs/*.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
aee40e50 506install DOCS/man/de/*.1 $RPM_BUILD_ROOT%{_mandir}/de/man1
507install DOCS/man/en/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
508install DOCS/man/es/*.1 $RPM_BUILD_ROOT%{_mandir}/es/man1
509install DOCS/man/fr/*.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
510install DOCS/man/hu/*.1 $RPM_BUILD_ROOT%{_mandir}/hu/man1
8cda16b8 511install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
aee40e50 512install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
841cb995 513#install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
e66a8169 514install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
6db4b1ea 515
2adea73e
AM
516%clean
517rm -rf $RPM_BUILD_ROOT
518
a69eaaef 519%post -n gmplayer
cd748ae6 520umask 022
cd748ae6 521[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
522
a69eaaef 523%postun -n gmplayer
cd748ae6 524umask 022
75b3147a 525[ ! -x /usr/bin/update-desktop-database ] || /usr/bin/update-desktop-database >/dev/null 2>&1 ||:
2ea7d522 526
2adea73e
AM
527%files
528%defattr(644,root,root,755)
1a8df7bd 529%attr(755,root,root) %{_bindir}/mplayer*
11421384
ER
530
531%if %{with gui}
532%files -n gmplayer
533%defattr(644,root,root,755)
1a8df7bd 534%attr(755,root,root) %{_bindir}/gmplayer*
11421384 535%{_desktopdir}/gmplayer.desktop
dd20ae16 536%dir %{_datadir}/%{name}/skins
0566b89b 537#%ghost %{_datadir}/%{name}/skins/default
11421384
ER
538%endif
539
0fb5a7ee 540%if %{with mencoder}
11421384
ER
541%files -n mencoder
542%defattr(644,root,root,755)
aeb67db6 543%doc DOCS/tech/encoding-guide.txt DOCS/tech/encoding-tips.txt
544%doc DOCS/tech/swscaler_filters.txt DOCS/tech/swscaler_methods.txt
545%doc DOCS/tech/colorspaces.txt
1a8df7bd 546%attr(755,root,root) %{_bindir}/mencoder*
0fb5a7ee 547%endif
11421384
ER
548
549%files common
550%defattr(644,root,root,755)
11421384
ER
551%doc DOCS/tech
552%if %{with win32}
35ac5af9 553%doc etc/codecs.win32.conf
11421384 554%endif
841cb995
ER
555%if %{with doc}
556# HTML and XML-generated docs
557%doc DOCS/HTML/en
0ffd4cd0 558%lang(cs) %doc DOCS/HTML/cs
aeb67db6 559%lang(de) %doc DOCS/HTML/de
aee40e50 560%lang(es) %doc DOCS/HTML/es
561%lang(fr) %doc DOCS/HTML/fr
8cda16b8 562%lang(hu) %doc DOCS/HTML/hu
aee40e50 563%lang(pl) %doc DOCS/HTML/pl
564%lang(ru) %doc DOCS/HTML/ru
841cb995
ER
565#%lang(zh_CN) %doc DOCS/zh
566%endif
567%doc AUTHORS README
11421384 568
906bf13b
JB
569%dir %{_sysconfdir}/%{name}
570%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
2adea73e 571%{_mandir}/man1/*
59ba0205 572%lang(cs) %{_mandir}/cs/man1/*
20e1052d 573%lang(de) %{_mandir}/de/man1/*
aee40e50 574%lang(es) %{_mandir}/es/man1/*
2a9a2b75 575%lang(fr) %{_mandir}/fr/man1/*
daef2f4a 576%lang(hu) %{_mandir}/hu/man1/*
8cda16b8 577%lang(it) %{_mandir}/it/man1/*
2a6ed516 578%lang(pl) %{_mandir}/pl/man1/*
841cb995 579#%lang(sv) %{_mandir}/sv/man1/*
90413e82 580%lang(zh_CN) %{_mandir}/zh_CN/man1/*
24481cd2 581%{_desktopdir}/mplayer.desktop
1087e996 582%{_pixmapsdir}/mplayer.png
11421384
ER
583%dir %{_datadir}/%{name}
584%{_datadir}/%{name}/font*
This page took 0.160492 seconds and 4 git commands to generate.