-#
-# TODO:
-# - add desktop file and png icon.
-#
+%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
-Release: 1
+Version: 0.5.1
+Release: 2
License: GPL
Group: X11/Applications/Games
-Source0: http://telia.dl.sourceforge.net/sourceforge/scummvm/%{name}_%{version}-src.tgz
+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
ScummVM potrafi równie¿ obs³u¿yæ gry nie oparte na silniku SCUMM. W chwili
obecnej jest to Simon The Sorcerer.
+%package tools
+Summary: SCUMM tools
+Summary(pl): Narzêdzia zwi±zane ze SCUMM
+Group: X11/Applications/Games
+
+%description tools
+SCUMM tools.
+
+%description tools -l pl
+Narzêdzia zwi±zane ze SCUMM.
+
%prep
-%setup -q -n %{name}
+%setup -q -a 1
+%patch0 -p1
%build
%{__make} \
- CC="%{__cxx}" \
+ CXX="%{__cxx}" \
+ CFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}"
+
+cd %{name}-tools-%{version_tools}
+%{__make} \
+ CC="%{__cc}" \
CFLAGS="%{rpmcflags}" \
LDFLAGS="%{rpmldflags}"
%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
+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
%files
%defattr(644,root,root,755)
-%doc readme.txt whatsnew.txt
-%attr(755,root,root) %{_bindir}/*
+%doc NEWS README
+%attr(755,root,root) %{_bindir}/scummvm
%{_mandir}/man6/*
+%{_pixmapsdir}/*
+%{_desktopdir}/*
+
+%files tools
+%defattr(644,root,root,755)
+%doc %{name}-tools-%{version_tools}/README
+%attr(755,root,root) %{_bindir}/*
+%exclude %{_bindir}/scummvm