-#
-# TODO:
-# - add desktop file and png icon. (when gui is ready)
-#
-%define _snap 20021109
-%define _toolsnap 20020919
+%define version_tools 0.5.0
Summary: SCUMM graphic adventure game interpreter
Summary(pl): Interpreter przygodówek opartych na SCUMM
Name: scummvm
-Version: 0.2.0.%{_snap}
-Release: 1
+Version: 0.5.1
+Release: 2
License: GPL
Group: X11/Applications/Games
-Source0: %{name}-%{_snap}.tar.bz2
-#Source0: http://telia.dl.sourceforge.net/sourceforge/scummvm/%{name}_%{version}-src.tgz
-Source1: %{name}-tools-%{_toolsnap}.tar.bz2
-Patch0: %{name}-lame.patch
-BuildRequires: mad-devel
+Source0: http://dl.sf.net/scummvm/%{name}-%{version}.tar.bz2
+# Source0-md5: 67bdbe2e145b8072d0bac61f7ed150c0
+Source1: http://dl.sf.net/scummvm/%{name}-tools-%{version_tools}.tar.bz2
+# Source1-md5: 4d9d4821b2cac5225ac408f00a69c189
+Source2: %{name}.desktop
+Source3: %{name}.png
+Patch0: %{name}-makefile.patch
+URL: http://scummvm.sourceforge.net/
+BuildRequires: libvorbis-devel
+BuildRequires: libmad-devel
BuildRequires: SDL-devel >= 1.2.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _prefix /usr/X11R6
-%define _mandir %{_prefix}/man
-
%description
ScummVM is an implementation of the SCUMM (Script Creation Utility for
Maniac Mansion) engine used in various Lucas Arts games such as Monkey
Narzêdzia zwi±zane ze SCUMM.
%prep
-%setup -q -a 1 -n %{name}
+%setup -q -a 1
%patch0 -p1
%build
CFLAGS="%{rpmcflags}" \
LDFLAGS="%{rpmldflags}"
-cd tools
+cd %{name}-tools-%{version_tools}
%{__make} \
CC="%{__cc}" \
CFLAGS="%{rpmcflags}" \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6,%{_pixmapsdir},%{_desktopdir}}
install scummvm $RPM_BUILD_ROOT%{_bindir}
install scummvm.6 $RPM_BUILD_ROOT%{_mandir}/man6
-install tools/{descumm{3,5,6},rescumm} $RPM_BUILD_ROOT%{_bindir}
-install tools/extract $RPM_BUILD_ROOT%{_bindir}/extract-scummvm
+cd %{name}-tools-%{version_tools}
+install {descumm{,6},rescumm,simon2mp3} $RPM_BUILD_ROOT%{_bindir}
+install extract $RPM_BUILD_ROOT%{_bindir}/extract-scummvm
+cd -
+
+install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
%clean
rm -rf $RPM_BUILD_ROOT
%doc NEWS README
%attr(755,root,root) %{_bindir}/scummvm
%{_mandir}/man6/*
+%{_pixmapsdir}/*
+%{_desktopdir}/*
%files tools
%defattr(644,root,root,755)
-%doc tools/readme.txt
-%attr(755,root,root) %{_bindir}/descumm*
-%attr(755,root,root) %{_bindir}/extract-scummvm
-%attr(755,root,root) %{_bindir}/rescumm
+%doc %{name}-tools-%{version_tools}/README
+%attr(755,root,root) %{_bindir}/*
+%exclude %{_bindir}/scummvm