Blob Blame History Raw
Name:           hedgewars
Version:        0.9.7
Release:        2%{?dist}
Summary:        2D tankbattle game with the tanks replaced by hedgehogs
Group:          Amusements/Games
License:        GPL+
URL:            http://www.hedgewars.org/
Source0:        http://hedgewars.org/download/hedgewars-src-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.png
Patch0:         hedgewars-0.9.0-debuginfo.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  fpc qt4-devel SDL_mixer-devel SDL_net-devel SDL_image-devel
BuildRequires:  SDL_ttf-devel openssl-devel cmake desktop-file-utils
Requires:       dejavu-fonts hicolor-icon-theme

%description
Hedgewars is a turn based strategy game but the real buzz is from watching the
devastation caused by those pesky hedgehogs with those fantastic weapons.

Each player controls a team of several hedgehogs. During the course of the
game, players take turns with one of their hedgehogs. They then use whatever
tools and weapons are available to attack and kill the opponents' hedgehogs,
thereby winning the game. Hedgehogs may move around the terrain in a variety
of ways, normally by walking and jumping but also by using particular tools
such as the "Rope" or "Parachute", to move to otherwise inaccessible areas.


%prep
%setup -q -n %{name}-src-%{version}
%patch0 -p1


%build
%cmake .
make %{?_smp_mflags} VERBOSE=1


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# replace private dejavu copy with symlink to system version
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf
ln -s ../../../fonts/dejavu/DejaVuSans-Bold.ttf \
  $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc COPYING Fonts_LICENSE.txt README
%{_bindir}/%{name}
%{_bindir}/hwengine
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png


%changelog
* Fri Dec 26 2008 Hans de Goede <hdegoede@redhat.com> 0.9.7-2
- Replace private dejavu copy with symlink to system version (rh 477396)

* Tue Nov  4 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.7-1
- New upstream release 0.9.7

* Wed Jul 30 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.6-1
- New upstream release 0.9.6

* Wed Jul  9 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.5-1
- New upstream release 0.9.5

* Thu Jun 26 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.4-1
- New upstream release 0.9.4

* Wed May  1 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.3-1
- New upstream release 0.9.3

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.2-2
- Autorebuild for GCC 4.3

* Tue Jan 22 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.2-1
- New upstream release 0.9.2

* Sat Jan 12 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-5
- Fix compilation with gcc 4.3

* Mon Sep 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-4
- Remove ExcludeArch ppc64, freepascal is available on ppc64 now (bz 284401)

* Mon Sep 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-3
- ExcludeArch ppc64, as freepascal (fpc) isn't available on ppc64 (bz 284401)

* Sun Sep  9 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-2
- Install data files into /usr/share/hedgewars instead of into
  /usr/share/hedgewars/hedgewars
- Minor desktop file cleanup

* Sun Aug 26 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.9.0-1
- Initial Fedora package