File profanation.spec of Package profanation

Name:           profanation
Version:        1.0
Release:        0
Summary:        "Abu Simbel Profanation" remake
License:        GPLv2+
Group:          Amusements/Games
URL:            http://www.masoftware.es/
# http://www.masoftware.es/ccount/index.php?cid=juegos&xrl=http://www.masoftware.es/descargas/%{name}/deluxe/ProfaDeluxe-Src.zip
Source0:        ProfaDeluxe-Src.tar.bz2
# http://www.masoftware.es/ccount/index.php?cid=juegos&xrl=http://www.masoftware.es/descargas/%{name}/deluxe/ProfaDeluxe-Win.zip
Source1:        ProfaDeluxe-Win.tar.bz2
Source2:        %{name}.png
Patch0:         %{name}-%{version}-dirs.patch
Patch1:         %{name}-%{version}-Makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  SDL-devel SDL_image-devel SDL_gfx-devel SDL_mixer-devel gcc-c++
BuildRequires:  update-desktop-files

%description
Remake of the spanish 8 bits game "Abu Simbel Profanation".

%prep
%setup -q -n ProfaDeluxe-src -a 1
%patch0
%patch1
iconv -f WINDOWS-1252 -t UTF-8 -o Leeme.txt.UTF-8 Leeme.txt && \
%{__mv} -f Leeme.txt.UTF-8 Leeme.txt
sed -i 's/\r//' Leeme.txt

%build
CXXFLAGS='%{optflags} -DDATADIR=\"%{_datadir}/games/%{name}\"' %{__make} -f Makefile.linux %{?jobs:-j%{jobs}}

%install
%{__install} -p -D -m 0755 %{name} '%{buildroot}%{_prefix}/games/%{name}'
%{__install} -d -m 0755 '%{buildroot}%{_datadir}/games/%{name}/Data'
%{__cp} -pr ProfaDeluxe-win/Data '%{buildroot}%{_datadir}/games/%{name}/'
%suse_update_desktop_file -c %name 'Abu Simbel Profanation Deluxe' 'Abu Simbel Profanation Deluxe' %name %name 'Game;ArcadeGame;'
MD5SUM=$(md5sum LICENSE | sed 's/ .*//')
if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
    ln -sf /usr/share/doc/licenses/md5/$MD5SUM LICENSE
fi

%clean
%{__rm} -rf '%{buildroot}'

%files
%defattr(-, root, root, 0755)
%doc Leeme.txt LICENSE
%{_prefix}/games/%{name}
%{_datadir}/games/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop

%changelog
* Thu Feb 14 2008 - cmorve69@yahoo.es
- initial package
openSUSE Build Service is sponsored by