Blob Blame History Raw
Name:           boswars
Version:        2.6.1
Release:        9%{?dist}
Summary:        Bos Wars is a futuristic real-time strategy game
Group:          Amusements/Games
License:        GPLv2
URL:            http://www.boswars.org/
Source0:        http://www.boswars.org/dist/releases/%{name}-%{version}-src.tar.gz
Source1:        %{name}.desktop
Patch0:         boswars-2.4.1-SConstruct.patch
# incomplete patch to port boswars to the system guichan-0.6 instead of
# using the included guichan-0.4. Incomplete, NOT finished and NOT working!
#Patch1:         boswars-2.4.1-guichan26.patch
# Lua 5.2
Patch2:		boswars-2.6.1-lua-5.2.patch
BuildRequires:  libtheora-devel libvorbis-devel lua-devel SDL-devel libGL-devel
BuildRequires:  tolua++-devel libpng-devel scons desktop-file-utils
Requires:       hicolor-icon-theme xorg-x11-utils

%description
Bos Wars is a futuristic real-time strategy game. It is possible to play
against human opponents over LAN, internet, or against the computer.
Bos Wars aims to create a completly original and fun open source RTS game.


%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1
%patch2 -p1 -b .lua-52
chmod -x engine/guichan/include/guichan/sdl/sdlgraphics.h \
  engine/include/animation.h engine/guichan/sdl/gsdl.cpp
# we want to use the system version of these
rm engine/tolua/*.h engine/tolua/tolua_*.cpp

%build
scons %{?_smp_mflags} opengl=1 CC="gcc $RPM_OPT_FLAGS" CXX="g++ $RPM_OPT_FLAGS"

%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/languages
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
install -p -m 644 languages/*.po languages/*.pot \
  $RPM_BUILD_ROOT%{_datadir}/%{name}/languages
cp -a campaigns graphics intro maps scripts sounds units patches \
  $RPM_BUILD_ROOT%{_datadir}/%{name}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 graphics/ui/elites_claw.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files
%doc *.txt CHANGELOG doc/*.html doc/guichan-copyright.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

%changelog
* Mon May 13 2013 Tom Callaway <spot@fedoraproject.org> - 2.6.1-9
- lua 5.2

* Thu Feb 14 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 2.6.1-8
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-5
- Rebuilt for c++ ABI breakage

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Nov 06 2011 Bruno Wolff III <bruno@wolff.to> - 2.6.1-3
- Rebuild for libpng 1.5

* Wed Apr 27 2011 Hans de Goede <hdegoede@redhat.com> - 2.6.1-2
- Fix missing patches / textures (#691251)

* Sun Mar 13 2011 Hans de Goede <hdegoede@redhat.com> - 2.6.1-1
- New upstream release 2.6.1

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Apr 16 2010 Hans de Goede <hdegoede@redhat.com> 2.6-1
- New upstream release 2.6

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Feb 21 2009 Hans de Goede <hdegoede@redhat.com> 2.5-2
- Fix build with gcc 4.4

* Sun Mar  2 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.5-1
- New upstream release 2.5

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

* Sat Jan 12 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.4.1-4
- Fix compilation with gcc 4.3
- Drop workaround for intel graphics crash, this is "fixed" in SDL now

* Tue Oct 30 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.4.1-3
- Add workaround for boswars crashing on intel integrated video (bz 310841)

* Mon Sep 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.4.1-2
- Add missing BuildRequires libpng-devel

* Sun Sep  9 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.4.1-1
- Initial Fedora package