-# TODO:
-# - nut support (http://www.nut.hu/ - currently down, but see svn.mplayerhq.hu/nut/)
-# - update for lzo 2
-# - try to use external lrmi and few other libs:
-# http://www.cyberlink.com/english/products/powercinema/pcm-linux/license/mplayer-10_copyright.htm
-# - segfaults on amd64:
-# mencoder -oac pcm -af dummy -ovc raw -vf format=yv12 -of ogg -mc 0 -quiet -o /tmp/out1 l.avi
-# avi: RIFF (little-endian) data, AVI, 480 x 360, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
#
# Conditional build:
-%bcond_with directfb # with DirectFB video output
-%bcond_with dxr3 # enable use of DXR3/H+ hardware MPEG decoder
-%bcond_with ggi # with ggi video output
-%bcond_with nas # with NAS audio output
-%bcond_with svga # with svgalib video output
-%bcond_without osd # with osd menu support
-%bcond_without altivec # without altivec support
-%bcond_without x264 # without x264 support
-%bcond_with xmms # with XMMS inputplugin support
-%bcond_without aalib # without aalib video output
-%bcond_without jack # without JACKD support
-%bcond_without alsa # without ALSA audio output
-%bcond_without arts # without arts audio output
-%bcond_without caca # without libcaca video output
-%bcond_without cdparanoia # without cdparanoia support
-%bcond_with dvdnav # without dvdnav support
-%bcond_without enca # disable using ENCA charset oracle library
-%bcond_without esd # disable EsounD sound support
-%bcond_without faad # disable FAAD2 (AAC) support
-%bcond_without gif # disable GIF support
-%bcond_without gui # without GTK+ GUI
-%bcond_without joystick # disable joystick support
-%bcond_without libdts # disable libdts support
-%bcond_without libdv # disable libdv en/decoding support
-%bcond_without lirc # without lirc support
-%bcond_with live # without LIVE555 libraries
-%bcond_without lzo # with LZO support (requires lzo 2.x)
-%bcond_without mad # without mad (audio MPEG) support
-%bcond_without pulseaudio # without pulseaudio output
-%bcond_without quicktime # without binary quicktime dll support
-%bcond_without real # without Real* 8/9 codecs support
+# - CPU optimization:
+%bcond_without altivec # PPC altivec support
+%bcond_without ssse3 # SSSE3 optimizations (needs binutils >= 2.16.92)
%bcond_without runtime # disable runtime cpu detection, just detect CPU
# in compile time (advertised by mplayer authors as working faster); in this case
# mplayer may not work on machine other then where it was compiled
-%bcond_without select # disable audio select() support (for example required this option ALSA or Vortex2 driver)
-%bcond_without smb # disable Samba (SMB) input support
-%bcond_without theora # without theora support
-%bcond_without win32 # without win32 codecs support
-%bcond_without vidix # disable vidix
-%bcond_without vorbis # without Ogg-Vorbis audio support
-%bcond_without xvid # disable XviD codec
-%bcond_without mencoder # disable mencoder (a/v encoder) compilation
-%bcond_without sdl # disable SDL
+%bcond_without hidden_visibility # no gcc hidden visibility
+%bcond_without verbose # disable verbose build
+# - general features:
+%bcond_without bluray # Blu-ray support
+%bcond_without cdio # libcdio support
+%bcond_without cdparanoia # cdparanoia support (when libcdio not enabled)
%bcond_without doc # don't build docs (slow)
+%bcond_without dvdnav # dvdnav support
+%bcond_without system_dvdcss # system libdvdcss library (instead of internal copy)
+%bcond_without system_dvdread # system libdvdread library (instead of internal copy)
+%bcond_without enca # disable using ENCA charset oracle library
+%bcond_without gui # without GTK+ GUI
+%bcond_without joystick # joystick support
+%bcond_without lirc # lirc support
+%bcond_without live # LIVE555 Streaming Media support
+%bcond_without mencoder # mencoder (a/v encoder) compilation
+%bcond_without nemesi # NeMeSi Streaming Media support
+%bcond_with on2 # patches from On2 Flix Engine for Linux
+%bcond_without osd # osd menu support
+%bcond_without rtmp # RTMPDump Streaming Media support
%bcond_with shared # experimental libmplayer.so support
-%bcond_with amr # enable 3GPP Adaptive Multi Rate (AMR) speech codec support
-%bcond_without gnomess # disable controling gnome screensaver
-%bcond_without ssse3 # sse3 optimizations (needs binutils >= 2.16.92)
+%bcond_without smb # Samba (SMB) input support
+%bcond_without vstream # TiVo vstream client support
+# - codecs:
+%bcond_without amr # Adaptive Multi Rate (AMR) speech codec support
+%bcond_without bs2b # BS2B audio filter support
+%bcond_without crystalhd # CrystalHD support
+%bcond_without faad # FAAD2 (AAC) support
+%bcond_without gif # GIF support
+%bcond_without ladspa # LADSPA plugin support
+%bcond_without libdts # libdts support
+%bcond_without libdv # libdv en/decoding support
+%bcond_without lzo # LZO support (requires lzo 2.x)
+%bcond_without mad # mad (audio MPEG) support
+%bcond_without mpg123 # libmpg123 MP3 decoding support
+%bcond_with musepack # libmpcdec support (derecated in favour of libavcodec)
+%bcond_without openjpeg # OpenJPEG (JPEG2000) input/output support
+%bcond_without quicktime # binary quicktime dll support
+%bcond_without real # Real* 8/9 codecs support
+%bcond_without vorbis # Ogg Vorbis audio support (both tremor and libvorbis)
+%bcond_with system_vorbis # use system libvorbis instead of internal tremor
+%bcond_without theora # Ogg Theora video support
+%bcond_without win32 # Win32 codecs support
+%bcond_without x264 # x264 support
+%bcond_with xmms # XMMS inputplugin support
+%bcond_without xvid # XviD codec
+%bcond_with system_libmpeg2 # system libmpeg2 library (instead of internal copy with some quantizer modifications)
%bcond_with system_ffmpeg # use ffmpeg-devel, rather bundled sources (likely needs ffmpeg from same svn revision than mplayer)
+# - video output:
+%bcond_without aalib # aalib video output
+%bcond_without caca # libcaca video output
+%bcond_with directfb # DirectFB video output
+%bcond_with dxr2 # DXR2 (hardware MPEG decoder) video output
+%bcond_with dxr3 # DXR3/H+ (hardware MPEG decoder) video output
+%bcond_with ggi # GGI video output
+%bcond_without sdl # SDL video output
+%bcond_with svga # svgalib video output
+%bcond_without vdpau # VDPAU acceleration
+%bcond_without vidix # VIDIX video drivers
+%bcond_with zr # ZR360[56]7/ZR36060 video output (needs deprecated V4L1 linux headers)
+%bcond_with gnomess # controling gnome screensaver [patch not updated]
+# - audio output:
+%bcond_without alsa # ALSA audio output
+%bcond_with arts # aRts audio output
+%bcond_with esd # EsounD sound support
+%bcond_without jack # JACKD support
+%bcond_with nas # NAS audio output
+%bcond_without pulseaudio # pulseaudio output
+%bcond_without select # audio select() support (required e.g. for ALSA or Vortex2 driver)
+
+%if %{with alsa}
+%undefine with_select
+%endif
+%if %{without vorbis}
+%undefine with_system_vorbis
+%endif
%ifnarch %{ix86}
%undefine with_win32
%undefine with_quicktime
%undefine with_vidix
%endif
-
%ifnarch %{ix86} %{x8664} ppc ppc64
%undefine with_runtime
%endif
+%ifnarch %{ix86} %{x8664}
+%undefine with_vdpau
+%endif
+%ifnarch ppc
+%undefine with_altivec
+%endif
+%ifnarch i686 pentium4 athlon %{x8664}
+%undefine with_crystalhd
+%endif
%if %{_lib} == "lib64"
-%define _suf 64
+%define binsuf 64
%else
-%define _suf 32
+%define binsuf 32
%endif
-%define subver rc2
-%define svnver 27725
-%define rel 15
-
+# date from directory inside of tarball (like mplayer-export-2014-04-29)
+%define snap 2014-09-12
+%define ssnap %(echo %{snap} | tr -d -)
Summary: MPlayer - THE Movie Player for UN*X
Summary(de.UTF-8): MPlayer ist ein unter der freien GPL-Lizenz stehender Media-Player
Summary(es.UTF-8): Otro reproductor de películas
Summary(pl.UTF-8): Odtwarzacz filmów dla systemów uniksowych
Summary(pt_BR.UTF-8): Reprodutor de filmes
Name: mplayer
-Version: 1.0
-Release: 5.%{subver}.%{rel}
+Version: 1.1.1
+Release: 6.%{ssnap}.1
# DO NOT increase epoch unless it's really neccessary!
# especially such changes like pre7->pre7try2, increase Release instead!
# PS: $ rpmvercmp pre7try2 pre7
Epoch: 3
License: GPL
Group: Applications/Multimedia
-Source0: http://distfiles.gentoo.org/distfiles/mplayer-%{version}_%{subver}_p%{svnver}.tar.bz2
-# Source0-md5: d89e86d9183d1a52a7a754d9a3c74724
+# Source0: http://mplayerhq.hu/MPlayer/releases/MPlayer-%{version}.tar.xz
+Source0: ftp://ftp.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2
+# Source0-md5: 28b3754f5a1f8d783e422e1bff239a92
+Source1: http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
+# Source1-md5: 05728909d83ea25c77e2d7912492ba93
Source3: ftp://ftp1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
# Source3-md5: 7b47904a925cf58ea546ca15f3df160c
Source5: g%{name}.desktop
Source7: %{name}.png
Source8: %{name}.desktop
# http://www.on2.com/gpl/mplayer/
-Source9: http://support.on2.com/gpl/mplayer/2008-09-30-mencoder-on2flixenglinux.tar.bz2
-# Source9-md5: a8a078c38eda90dff980f9bf1768960f
-Patch1: %{name}-cp1250-fontdesc.patch
-#Patch2: %{name}-codec.patch
-#Patch3: %{name}-home_etc.patch
-Patch4: %{name}-350.patch
-Patch5: %{name}-configure.patch
-# outdated via ffmpeg?
-Patch6: %{name}-system-amr.patch
-Patch8: %{name}-altivec.patch
-#Patch10: %{name}-pcmsplit.patch
-#Patch13: %{name}-mythtv.patch
-Patch14: %{name}-shared.patch
-#http://www.openchrome.org/snapshots/mplayer/
-#Patch15: %{name}-xvmc.patch
-Patch17: %{name}-auto-expand.patch
-# update
-#Patch18: %{name}-gnome-screensaver.patch
-Patch19: %{name}-on2flix.patch
-Patch22: %{name}-ffmpeg.patch
-Patch24: %{name}-fontconfig_sub.patch
-Patch26: %{name}-check-byteswap.patch
+Source9: http://support.on2.com/gpl/mplayer/2009-10-08-mencoder-on2flixenglinux.tar.bz2
+# Source9-md5: 07774a2663a8fda07c308df0c6569b56
+Patch0: %{name}-giflib.patch
+
+# build (configure / Makefile) related:
+Patch10: %{name}-ldflags.patch
+Patch11: %{name}-altivec.patch
+Patch12: %{name}-check-byteswap.patch
+Patch13: %{name}-visibility-hidden-fix.patch
+
+Patch15: %{name}-live555-async.patch
+Patch16: %{name}-libcdio.patch
+Patch17: %{name}-gsm.patch
+Patch18: %{name}-openjpeg.patch
+Patch19: %{name}-shared.patch
+Patch20: %{name}-vstream.patch
+Patch23: vstream-format-security.patch
+
+# codecs, outputs, demuxers:
+Patch21: %{name}-auto-expand.patch
+Patch22: %{name}-release_directfb.patch
+
+# goodies:
+Patch30: %{name}-cp1250-fontdesc.patch
+Patch31: %{name}-350.patch
+# update, hard to fix right now because of gnome bug 579430:
+# https://bugzilla.gnome.org/show_bug.cgi?id=579430
+#Patch32: %{name}-gnome-screensaver.patch
+
+Patch100: %{name}-on2flix.patch
+Patch101: %{name}-link.patch
+
URL: http://www.mplayerhq.hu/
%{?with_directfb:BuildRequires: DirectFB-devel}
BuildRequires: OpenAL-devel
BuildRequires: OpenGL-devel
%{?with_sdl:BuildRequires: SDL-devel >= 1.1.7}
+BuildRequires: a52dec-libs-devel
%{?with_aalib:BuildRequires: aalib-devel}
%{?with_alsa:BuildRequires: alsa-lib-devel}
-%if %{with amr}
-BuildRequires: amrnb-devel
-BuildRequires: amrwb-devel >= 5.3.0
-%endif
%{?with_arts:BuildRequires: artsc-devel}
%{?with_ssse3:BuildRequires: binutils >= 3:2.16.92}
-%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
-%{?with_doc:BuildRequires: docbook-style-xsl}
+BuildRequires: bzip2-devel
+#%{?with_cdparanoia:BuildRequires: cdparanoia-III-devel}
+%{?with_gnomess:BuildRequires: dbus-glib-devel}
+BuildRequires: dirac-devel
%{?with_doc:BuildRequires: docbook-dtd412-xml}
+%{?with_doc:BuildRequires: docbook-style-xsl}
+%{?with_dxr2:BuildRequires: dxr2-driver-devel}
%{?with_dxr3:BuildRequires: em8300-devel}
%{?with_enca:BuildRequires: enca-devel}
%{?with_esd:BuildRequires: esound-devel}
BuildRequires: faac-devel
%{?with_faad:BuildRequires: faad2-devel >= 2.0}
%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-4.20081024.3}
-BuildRequires: freetype-devel
+BuildRequires: fontconfig-devel >= 1:2.4.2
+BuildRequires: freetype-devel >= 1:2.2.1
BuildRequires: fribidi-devel
-%{?with_vidix:BuildRequires: vidix-devel}
-%ifarch ppc
-%{?with_altivec:BuildRequires: gcc >= 5:3.3.2-3}
-%endif
+%{?with_altivec:BuildRequires: gcc >= 5:4.1}
%{?with_gif:BuildRequires: giflib-devel}
-%if %{with gui}
-BuildRequires: gtk+2-devel
-%endif
-%{?with_gnomess:BuildRequires: dbus-glib-devel}
+%{?with_gui:BuildRequires: gtk+2-devel}
%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
-%{?with_jack:%requires_eq jack-audio-connection-kit-libs}
+%{?with_ladspa:BuildRequires: ladspa-devel}
BuildRequires: lame-libs-devel
+BuildRequires: libass-devel >= 0.9.10
+%{?with_bluray:BuildRequires: libbluray-devel}
+%{?with_bs2b:BuildRequires: libbs2b-devel >= 3.0.0}
%{?with_caca:BuildRequires: libcaca-devel}
+%{?with_cdio:BuildRequires: libcdio-paranoia-devel}
+%{?with_crystalhd:BuildRequires: libcrystalhd-devel}
%{?with_libdts:BuildRequires: libdts-devel}
-%{?with_libdv:BuildRequires: libdv-devel}
+%{?with_libdv:BuildRequires: libdv-devel > 0.9.5}
+#%{?with_system_dvdcss:BuildRequires: libdvdcss-devel}
%{?with_dvdnav:BuildRequires: libdvdnav-devel >= 4.1.3}
+%{?with_system_dvdread:BuildRequires: libdvdread-devel >= 4.1}
%{?with_ggi:BuildRequires: libggi-devel}
+%{?with_ggi:BuildRequires: libggiwmh-devel}
+BuildRequires: libgsm-devel
BuildRequires: libjpeg-devel
%{?with_mad:BuildRequires: libmad-devel}
-BuildRequires: libmpcdec-devel >= 1.2.1
+BuildRequires: libmng-devel
+%{?with_musepack:BuildRequires: libmpcdec-devel >= 1.2.1}
+%{?with_system_libmpeg2:BuildRequires: libmpeg2-devel}
+%{?with_mpg123:BuildRequires: libmpg123-devel >= 1.14}
+%{?with_nemesi:BuildRequires: libnemesi-devel >= 0.6.3}
+BuildRequires: libnut-devel
BuildRequires: libpng-devel
+%{?with_rtmp:BuildRequires: librtmp-devel}
%{?with_smb:BuildRequires: libsmbclient-devel}
%{?with_theora:BuildRequires: libtheora-devel}
-# tremor is used by default, internal as we don't have system one
-#%{?with_vorbis:BuildRequires: libvorbis-devel}
-%{?with_x264:BuildRequires: libx264-devel >= 0.1.2-1.20081023_2245.1}
+%{?with_vdpau:BuildRequires: libvdpau-devel}
+%{?with_system_vorbis:BuildRequires: libvorbis-devel}
+BuildRequires: libvpx-devel
+%{?with_x264:BuildRequires: libx264-devel >= 0.1.3}
BuildRequires: libxslt-progs
%{?with_lirc:BuildRequires: lirc-devel}
-%{?with_live:BuildRequires: live}
+%{?with_live:BuildRequires: live-devel >= 2:2011.01.10}
%{?with_lzo:BuildRequires: lzo-devel >= 2.0}
%{?with_nas:BuildRequires: nas-devel}
BuildRequires: ncurses-devel
+%{?with_amr:BuildRequires: opencore-amr-devel}
+%{?with_openjpeg:BuildRequires: openjpeg-devel}
BuildRequires: pkgconfig
%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9}
+BuildRequires: rpm >= 4.4.9-56
+BuildRequires: rpmbuild(macros) >= 1.527
+BuildRequires: schroedinger-devel
BuildRequires: speex-devel >= 1.1
%{?with_svga:BuildRequires: svgalib-devel}
-%{?with_xmms:BuildRequires: xmms-libs}
+BuildRequires: tar >= 1:1.22
+BuildRequires: twolame-devel
+%{?with_vidix:BuildRequires: vidix-devel}
+%{?with_vstream:BuildRequires: vstream-client-devel}
+%{?with_xmms:BuildRequires: xmms-devel}
BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXScrnSaver-devel
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXinerama-devel
BuildRequires: xorg-lib-libXv-devel
BuildRequires: xorg-lib-libXxf86dga-devel
BuildRequires: xorg-lib-libXxf86vm-devel
%{?with_xvid:BuildRequires: xvid-devel >= 1:0.9.0}
+BuildRequires: xz
+%ifarch %{ix86} %{x8664}
+BuildRequires: yasm
+%endif
BuildRequires: zlib-devel
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: OpenGL
Summary: Configuration files and documentation for MPlayer
Summary(pl.UTF-8): Pliki konfiguracyjne i dokumentacja dla MPlayera
Group: Applications/Multimedia
+Suggests: unrar
Obsoletes: mplayer-vidix
%description common
%description common -l pl.UTF-8
Pliki konfiguracyjne, strona manuala i dokumentacja HTML dla MPlayera.
+%package doc
+Summary: HTML documentation for MPlayer
+Summary(pl.UTF-8): Dokumentacja do MPlayera w formacie HTML
+Group: Documentation
+
+%description doc
+HTML Documentation for MPlayer.
+
+%description doc -l pl.UTF-8
+Dokumentacja do MPlayera w formacie HTML.
+
%package -n mencoder
Summary: MEncoder - a movie encoder for Linux
Summary(pl.UTF-8): MEncoder - koder filmów dla Linuksa
MEncoder to koder filmów dla Linuksa będący częścią pakietu MPlayer.
%prep
-%setup -q -n mplayer-%{version}_%{subver}_p%{svnver} -a3 -a6 -a9
+%setup -q -n %{name}-export-%{snap} -a1 -a3 -a6 -a9
cp -f etc/codecs.conf etc/codecs.win32.conf
-%patch1 -p0
-#%%patch2 -p1 -- still needed?
-##%%patch3 -p1 -- old home_etc behavior
-%patch4 -p1
-%patch5 -p1
-#%%patch6 -p1 # - try ffmpeg
-%patch8 -p1
-#%%patch10 -p1
-#%%patch13 -p1 # TODO
-%if %{with shared}
-%patch14 -p1
-%endif
-#%%patch15 -p0 # TODO
+%patch0 -p1
+
+# build (configure / Makefile) related:
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+
+%patch15 -p1
+%patch16 -p1
%patch17 -p1
-%if %{with gnomess}
-#%%patch18 -p1
-%endif
+%patch18 -p1
+%{?with_shared:%patch19 -p1}
+%patch20 -p1
+%patch23 -p0
+
+# codecs, outputs, demuxers:
+%patch21 -p1
+%patch22 -p1
+
+# goodies:
+%patch30 -p0
+%patch31 -p1
+#%{with_gnomess:%patch32 -p1}
# on2flix
mv mencoder-on2flixenglinux{-*-*-*,}
+%if %{with on2}
+#%%patch100 -p1
cp -a mencoder-on2flixenglinux/patch/new_files/libmpdemux/* libmpdemux
-#rm -f mencoder-on2flixenglinux/patch/version.diff
-%patch19 -p1
+# remove broken patches:
+# - first set does not apply
+# - second set beakes build
+for PATCH in asf-correct_movielength avi_check_idxflags \
+ demux_lavf-add_dv_mts_preferred demux_lavf-probe_small_files \
+ mencoder_07_demux_update_pts mencoder_10_correct_pts \
+ mpegvideo-revert_r18381 \
+ \
+ reduce_spurious_logging
+do
+ rm mencoder-on2flixenglinux/patch/$PATCH.diff
+done
for a in mencoder-on2flixenglinux/patch/*.diff; do
patch -p0 < $a
done
+%endif
+
+%patch101 -p1
+
+cat etc/example.conf > etc/mplayer.conf
+cat <<'CONFIGADD' >> etc/mplayer.conf
+
+######################
+# PLD Linux Defaults #
+######################
+[default]
+
+# alternate solution for CP1250-encoded subtitles
+fontconfig = yes
+subcp = cp1250
-%{?with_system_ffmpeg:%patch22 -p1}
-%patch24 -p0
-%patch26 -p1
+# ...or if you prefer native bitmap fonts shipped with mplayer
+#fontconfig = no
+#subcp = iso-8859-1
-# recent dvdnav-config doesn't support --minilibs.
-sed -i 's:--minilibs:--libs:g' configure
+# Standard location
+unrarexec = "%{_bindir}/unrar"
-# Set version #
-%{__sed} -i s/UNKNOWN/%{svnver}/ version.sh
+# Joystick input is disabled because of issues on some laptops (thinkpad, macbook pro).
+joystick=no
-sed -e '/Delete this default/d' etc/example.conf > etc/mplayer.conf
-rm -f font-*/runme
+CONFIGADD
%if %{with system_ffmpeg}
# using external ffmpeg, but mplayer adds these to includepath
-rm -rf libavcodec libavdevice libavformat libavutil libpostproc libswscale
+%{__rm} -rf ffmpeg
%endif
%build
-%if %{with shared}
-CFLAGS="%{rpmcflags} -fPIC"
-%else
-CFLAGS="%{rpmcflags}"
-%endif
-CC="%{__cc}"
-LDFLAGS="%{rpmldflags}"
-export CC CFLAGS LDFLAGS
+CFLAGS="%{rpmcflags} %{?with_hidden_visibility:-fvisibility=hidden} %{?with_shared:-fvisibility=default -fPIC}"
+CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb::%{_includedir}/directfb} -DHAVE_GSM_H=1"
+# NOTE:
+# - lircc refers to obsolete liblircc library (used in LIRCCD < 0.9)
+# - toolame is obsolete predecessor of twolame
build() {
-set -x
+ set -x
+
./configure \
%{?debug:--enable-debug=3} \
--prefix=%{_prefix} \
+ --codecsdir=%{_libdir}/codecs \
--confdir=%{_sysconfdir}/mplayer \
- --with-extraincdir=%{_includedir}/xvid \
- --with-extralibdir=%{?_x_libraries}%{!?_x_libraries:%{_libdir}} \
+ --cc="%{__cc}" \
+ --extra-cflags="$CFLAGS" \
+ --real-ldflags="%{rpmldflags}" \
+ --extra-ldflags="%{?_x_libraries:-L%{_x_libraries}}" \
+ --language=all \
%if %{with system_ffmpeg}
- --disable-libavutil_a \
- --disable-libavcodec_a \
- --disable-libavformat_a \
- --disable-libpostproc_a \
- --enable-libavutil_so \
- --enable-libavcodec_so \
- --enable-libavformat_so \
- --enable-libpostproc_so \
+ --disable-ffmpeg_a \
%endif
%ifnarch %{ix86} %{x8664}
- --disable-mmx \
- --disable-mmxext \
--disable-3dnow \
--disable-3dnowext \
+ --disable-fastmemcpy \
+ --disable-mmx \
+ --disable-mmxext \
--disable-sse \
--disable-sse2 \
- --disable-fastmemcpy \
%endif
- %{!?with_ssse3:--disable-ssse3} \
+ %{__disable ssse3} \
%ifarch ppc
- %{!?with_altivec:--disable-altivec} \
+ %{__disable altivec} \
%endif
- %{!?with_amr:--disable-libamr_nb --disable-libamr_wb} \
- %{?with_amr:--enable-libamr_nb --enable-libamr_wb} \
- %{?with_directfb:--enable-directfb} \
- %{!?with_directfb:--disable-directfb} \
- %{!?with_dxr3:--disable-dxr3} \
- %{!?with_ggi:--disable-ggi} \
- %{?with_live:--enable-live --with-extraincdir=/usr/include/liveMedia} \
- %{!?with_live:--disable-live} \
- %{!?with_lzo:--disable-liblzo} \
- %{!?with_nas:--disable-nas} \
- %{!?with_svga:--disable-svga} \
- %{!?with_aalib:--disable-aa} \
- %{!?with_jack:--disable-jack} \
- %{!?with_alsa:--disable-alsa} \
- %{?with_alsa:--enable-alsa --disable-select} \
- %{!?with_arts:--disable-arts} \
- %{!?with_caca:--disable-caca} \
- %{!?with_cdparanoia:--disable-cdparanoia} \
- %{!?with_enca:--disable-enca} \
- %{!?with_esd:--disable-esd} \
- %{!?with_faad:--disable-faad-external --disable-faad-internal} \
- %{?with_faad:--disable-faad-internal} \
- %{!?with_gif:--disable-gif} \
- %{?with_joystick:--enable-joystick} \
- %{!?with_libdv:--disable-libdv} \
- %{!?with_libdts:--disable-libdts} \
- --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
- %{!?with_mad:--disable-mad} \
- %{!?with_pulseaudio:--disable-polyp} \
- %{!?with_quicktime:--disable-qtx} \
- %{!?with_real:--disable-real} \
- --%{?with_runtime:en}%{!?with_runtime:dis}able-runtime-cpudetection \
- %{!?with_select:--disable-select} \
- %{!?with_smb:--disable-smb} \
- %{!?with_win32:--disable-win32dll} \
- %{!?with_vorbis:--disable-vorbis} \
- %{?with_osd:--enable-menu} \
- %{!?with_theora:--disable-theora} \
- %{!?with_x264:--disable-x264} \
- %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
- %{!?with_xvid:--disable-xvid} \
- %{!?with_vidix:--disable-vidix} \
- %{!?with_mencoder:--disable-mencoder} \
+ %{__disable aalib aa} \
+ %{__enable_disable alsa} \
+ %{__disable arts} \
+ %{__disable bluray} \
+ %{__disable caca} \
+ %{__disable cdparanoia} \
--enable-dga1 \
--enable-dga2 \
- --%{!?with_dvdnav:dis}%{?with_dvdnav:en}able-dvdnav \
+ %{__enable_disable directfb} \
+ %{__enable_disable dvdnav} \
+ %{__disable system_dvdread dvdread-internal} \
+ %{__disable dxr2} \
+ %{__disable dxr3} \
+ --enable-dynamic-plugins \
+ %{__disable enca} \
+ %{__disable esd} \
+ %{__disable faad} \
--enable-fbdev \
+ %{__disable gif} \
--enable-gl \
+ %{__disable ggi} \
+ %{__disable jack} \
+ %{__enable joystick} \
+ %{__disable cdio libcdio} \
+ %{__disable ladspa} \
+ %{__disable bs2b libbs2b} \
+ %{__disable libdts libdca} \
+ %{__disable libdv} \
+ %{__disable system_dvdcss libdvdcss-internal} \
+ %{__disable lzo liblzo} \
+ %{__disable system_libmpeg2 libmpeg2-internal} \
+ %{__disable nemesi} \
+ %{__enable_disable amr libopencore_amrnb} %{__enable_disable amr libopencore_amrwb} \
+ %{__disable openjpeg} \
+ %{__disable rtmp librtmp} \
+ %{__disable vorbis libvorbis} \
+ %{__enable_disable lirc} \
+ --disable-lircc \
+ %{__disable live} \
+ %{__disable mad} \
+ %{__disable mencoder} \
+ %{__enable osd menu} \
--enable-mga \
+ %{__disable mpg123} \
+ %{__enable musepack} \
+ %{__disable nas} \
+ %{__disable pulseaudio pulse} \
+ %{__disable quicktime qtx} \
--enable-radio \
--enable-radio-capture \
- --%{?with_sdl:en}%{!?with_sdl:dis}able-sdl \
+ %{__disable real} \
+ %{__enable_disable runtime runtime-cpudetection} \
+ %{__enable_disable sdl} \
+ %{__disable select} \
+ --enable-s3fb \
+ %{__disable smb} \
+ %{__disable svga} \
--enable-tdfxfb \
+ --enable-tdfxvid \
+ %{__disable theora} \
+ --disable-toolame \
+ --disable-tremor \
+ %{__disable vorbis tremor-internal} \
+ %{__disable_if system_vorbis tremor-internal} \
+ --enable-unrarexec \
+ %{__disable vdpau} \
+ %{__disable vidix} \
+ %{__disable vstream} \
--enable-vm \
+%ifarch ppc
+ --enable-wii \
+%endif
+ %{__disable win32 win32dll} \
--enable-x11 \
+ %{__disable x264} \
--enable-xmga \
+ %{?with_xmms:--enable-xmms --with-xmmsplugindir=%{_libdir}/xmms/Input --with-xmmslibdir=%{_libdir}} \
--enable-xv \
- --enable-xvmc \
- --enable-dynamic-plugins \
- --enable-largefiles \
- --language=all \
- --codecsdir=%{_libdir}/codecs \
- --with-xvmclib=XvMCW \
+ %{__disable xvid} \
+ --enable-xvmc --with-xvmclib=XvMCW \
+ %{__enable_disable zr} \
"$@"
- %{__make}
+ %{__make} %{?with_verbose:V=1}
}
%if %{with gui}
build --disable-gui
%if %{with doc}
-%{__make} -j1 -C DOCS/xml
+%{__make} -j1 doc
%endif
%install
install -d \
$RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_sysconfdir}/mplayer} \
$RPM_BUILD_ROOT%{_mandir}/{cs,de,es,fr,hu,it,pl,sv,zh_CN,}/man1 \
- $RPM_BUILD_ROOT%{_datadir}/mplayer/skins \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/skins \
$RPM_BUILD_ROOT%{_desktopdir}
# default config files
# executables
%if %{with mencoder}
-install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{_suf}
-ln -sf mencoder%{_suf} $RPM_BUILD_ROOT%{_bindir}/mencoder
+install mencoder $RPM_BUILD_ROOT%{_bindir}/mencoder%{binsuf}
+ln -sf mencoder%{binsuf} $RPM_BUILD_ROOT%{_bindir}/mencoder
%endif
-install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{_suf}
-ln -sf mplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/mplayer
+install mplayer $RPM_BUILD_ROOT%{_bindir}/mplayer%{binsuf}
+ln -sf mplayer%{binsuf} $RPM_BUILD_ROOT%{_bindir}/mplayer
%if %{with gui}
-install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{_suf}
-ln -sf gmplayer%{_suf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
+install gmplayer $RPM_BUILD_ROOT%{_bindir}/gmplayer%{binsuf}
+ln -sf gmplayer%{binsuf} $RPM_BUILD_ROOT%{_bindir}/gmplayer
+%endif
+
+%if %{with shared}
+install -d $RPM_BUILD_ROOT%{_libdir}
+install libmplayer.so $RPM_BUILD_ROOT%{_libdir}
%endif
# fonts
ln -sf font-arial-iso-8859-2/font-arial-24-iso-8859-2 $RPM_BUILD_ROOT%{_datadir}/mplayer/font
%if %{with gui}
-touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
%endif
+touch $RPM_BUILD_ROOT%{_datadir}/%{name}/skins/default
install %{SOURCE8} $RPM_BUILD_ROOT%{_desktopdir}
install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}
install DOCS/man/it/*.1 $RPM_BUILD_ROOT%{_mandir}/it/man1
install DOCS/man/pl/*.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
#install DOCS/man/sv/*.1 $RPM_BUILD_ROOT%{_mandir}/sv/man1
-install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
+#install DOCS/man/zh/*.1 $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
%clean
rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/gmplayer*
%{_desktopdir}/gmplayer.desktop
-%dir %{_datadir}/%{name}/skins
-%ghost %{_datadir}/%{name}/skins/default
%endif
%if %{with mencoder}
%attr(755,root,root) %{_bindir}/mencoder*
%endif
-%files common
+%if %{with doc}
+%files doc
%defattr(644,root,root,755)
%doc DOCS/tech
-%if %{with win32}
-%doc etc/codecs.win32.conf
-%endif
-%if %{with doc}
# HTML and XML-generated docs
%doc DOCS/HTML/en
%lang(cs) %doc DOCS/HTML/cs
%lang(ru) %doc DOCS/HTML/ru
#%lang(zh_CN) %doc DOCS/zh
%endif
+
+%files common
+%defattr(644,root,root,755)
%doc AUTHORS README
+%{?with_shared:%attr(755,root,root) %{_libdir}/libmplayer.so}
+%if %{with win32}
+%doc etc/codecs.win32.conf
+%endif
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
%lang(it) %{_mandir}/it/man1/*
%lang(pl) %{_mandir}/pl/man1/*
#%lang(sv) %{_mandir}/sv/man1/*
-%lang(zh_CN) %{_mandir}/zh_CN/man1/*
+#%lang(zh_CN) %{_mandir}/zh_CN/man1/*
%{_desktopdir}/mplayer.desktop
%{_pixmapsdir}/mplayer.png
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/font*
+%dir %{_datadir}/%{name}/skins
+%ghost %{_datadir}/%{name}/skins/default