|
楼主 |
发表于 2003-1-14 17:37:10
|
显示全部楼层
mplayer.spec
# $Id: mplayer.spec,v 1.47 2003/01/11 21:34:05 dude Exp $
# The default font size for subtitles : 14, 18, 24 or 28
%define fontsize 18
# Default font encoding, you may easily change to iso-8859-2 if needed
%define fontdir iso-8859-1
# Is this a daily build? If so, put the date like "20020808" otherwise put 0
#define date 0
%define date 20030111
#define ffversion cvs-2003-01-11
%define ffversion 0.4.6
%define rcver rc2
%define desktop_vendor freshrpms
#%define release 1
#%define cvs 0
#%if%{cvs}
#%define version %{ver}.%{cvsbuild}
#%define fversion %{cvsbuild}
#%else
#%define version %{ver}
#%define fversion %{ver}
#%endif
%ifnarch %{ix86}
%define _without_win32 1
%define _without_vidix 1
%endif
# The language to use in mplayer, one of : cz de dk en es fr hu nl no pl ro ru zh
%define mplang zh
%define _win32_libdir "/usr/local/lib/win32"
%define _xanim_libdir "/usr/X11R6/lib/xanim"
%define _real_libdir "/usr/local/Real/Codecs"
Summary: MPlayer, the Movie Player for Linux.
Name: mplayer
Version: 0.90
Release: gugong0%{rcver}.3.%{date}
License: GPL
Group: Applications/Multimedia
%if %{date}
Source0: http://www2.mplayerhq.hu/MPlayer/cvs/MPlayer-current.tar.bz2
# This needs to be updated separately for CVS builds! See DOCS/codecs.html
Source1: http://ffmpeg.sourceforge.net/cvs/ffmpeg-%{ffversion}.tar.gz
%else
Source0: http://www2.mplayerhq.hu/MPlayer/cvs/MPlayer-%{version}%{rcver}.tar.bz2
%endif
Source2: http://www2.mplayerhq.hu/MPlayer/Skin/default.tar.bz2
Source3: http://www2.mplayerhq.hu/MPlayer/releases/mp-arial-iso-8859-1.zip
Source4: http://www2.mplayerhq.hu/MPlayer/releases/mp-arial-iso-8859-2.zip
Patch0: MPlayer-0.90pre9-runtimemsg.patch
Patch1: MPlayer-0.90pre10-redhat.patch
URL: http://mplayerhq.hu/
BuildRoot: %{_tmppath}/%{name}-root
Requires: libdvdread, gtk+, SDL
Requires: lame, libvorbis
%{?_with_dvdnav:Requires: libdvdnav}
%{!?_without_alsa:Requires: alsa-lib}
%{!?_without_aalib:Requires: aalib}
%{!?_without_lirc:Requires: lirc}
%{!?_without_libdv:Requires: libdv}
%{!?_without_arts:Requires: arts}
%{!?_without_xvid:Requires: xvidcore}
BuildRequires: libdvdread-devel, gtk+-devel, SDL-devel
BuildRequires: lame-devel, libvorbis-devel, libmad
BuildRequires: /usr/bin/find, unzip, desktop-file-utils
%{?_with_dvdnav:BuildRequires: libdvdnav-devel}
%{!?_without_alsa:BuildRequires: alsa-lib-devel}
%{!?_without_aalib:BuildRequires: aalib-devel}
%{!?_without_cdparanoia:BuildRequires: cdparanoia-devel}
%{!?_without_libdv:BuildRequires: libdv-devel}
%{!?_without_arts:BuildRequires: arts-devel}
%{!?_without_xvid:BuildRequires: xvidcore}
%description
MPlayer is a movie player. It plays most video formats as well as DVDs.
Its big feature is the wide range of supported output drivers. There are also
nice antialiased shaded subtitles and OSD.
Available rpmbuild rebuild options :
--with : dvdnav
--without : alsa aalib lirc cdparanoia libdv arts xvid
%prep
%if %{date}
%setup -q -n MPlayer-%{date} -a 1
rm -rf libavcodec && mv ffmpeg-%{ffversion}/libavcodec .
%else
%setup -q -n MPlayer-%{version}%{rcver}
%endif
%patch0 -p1 -b .runtimemsg
%patch1 -p0 -b .redhat
%build
find . -name "CVS" | xargs rm -rf
./configure \
--target=%{_target_platform} \
--prefix=%{_prefix} \
--datadir=%{_datadir}/mplayer \
--confdir=%{_sysconfdir}/mplayer \
--mandir=%{_mandir} \
--enable-gui \
--enable-largefiles \
--language=%{mplang} \
--enable-win32 \
--with-win32libdir=%{_win32_libdir} \
--with-xanimlibdir=%{_xanim_libdir} \
--with-reallibdir=%{_real_libdir} \
--enable-freetype \
--with-freetype-config=/usr/bin/freetype-config \
--enable-qtx-codecs \
--enable-new-conf \
--enable-menu \
--enable-fbdev \
--enable-fbdev=nocopy \
--enable-mga \
--enable-tdfxfb \
--enable-vm \
--enable-x11 \
--enable-xmga \
--enable-xv \
--enable-dga \
--enable-joystick \
--disable-mpdvdkit \
%{!?_with_dvdnav:--disable-dvdnav} \
%{?_without_alsa:--disable-alsa} \
%{?_without_aalib:--disable-aa} \
%{?_without_lirc:--disable-lirc} \
%{?_without_cdparanoia:--disable-cdparanoia} \
%{!?_without_cdparanoia:--with-cdparanoiaincdir=%{_includedir}/cdda} \
%{?_without_libdv:--disable-libdv} \
%{?_without_arts:--disable-arts} \
--disable-runtime-cpudetection \
--enable-shared-pp \
--enable-i18n
# --enable-win32 \
# --with-win32libdir=%{_libdir}/win32 \
# --enable-runtime-cpudetection \
# %{?_without_cdparanoia:--disable-cdparanoia} \
# %{!?_without_cdparanoia:--with-cdparanoiaincdir=%{_includedir}/cdda} \
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# The Skins (well, only one left, others are in mplayer-skins now)
mkdir -p %{buildroot}%{_datadir}/mplayer/Skin
pushd %{buildroot}%{_datadir}/mplayer/Skin
for skin in %{SOURCE2}
do
tar -x -j -f ${skin}
done
popd
# The font for the subtitles
pushd %{buildroot}%{_datadir}/mplayer
rmdir font || :
unzip %{SOURCE3}
unzip %{SOURCE4}
ln -s -f %{fontdir}/arial-%{fontsize} font
popd
... .... |
|