Blob Blame History Raw
Name:           barrage
Version:        1.0.2
Release:        7%{?dist}
Summary:        Kill and destroy as many targets as possible within 3 minutes

Group:          Amusements/Games
License:        GPLv2+
URL:            http://lgames.sourceforge.net/index.php?project=Barrage
Source0:        http://downloads.sourceforge.net/lgames/%{name}-%{version}.tar.gz
Source1:        %{name}.png
Patch0:         newrpms-%{name}-datadir.patch
Patch1:         barrage-1.0.2-menu-overflow.patch
Patch2:         barrage-1.0.2-dsolink.patch
Patch3:         barrage-1.0.2-spelling.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:       hicolor-icon-theme
BuildRequires:  SDL-devel SDL_mixer-devel desktop-file-utils

%description
Barrage is a rather violent action game with the objective to kill
and destroy as many targets as possible within 3 minutes. The player
controls a gun that may either fire small or large grenades at
soldiers, jeeps and tanks. It is a very simple gameplay though it is
not that easy to get high scores.


%prep
%setup -q
%patch0 -p0 -b .datadir
%patch1 -p0
%patch2 -p0
%patch3 -p0
# add Icon to desktop file
echo Icon=barrage >> barrage.desktop

%build
autoreconf --force --install
%configure
make %{?_smp_mflags}


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

# below the desktop file and icon stuff
desktop-file-install \
        --remove-category="X-Red-Hat-Base;Application" \
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
        $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop

mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps

install -p -m 0644 %{SOURCE1} \
           $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%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 AUTHORS BUGS ChangeLog COPYING README
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png


%changelog
* Fri Mar 19 2010 Jon Ciesla <limb@jcomserv.net> - 1.0.2-7
- Spelling fix.

* Fri Mar 19 2010 Jon Ciesla <limb@jcomserv.net> - 1.0.2-6
- Fix for crash due to overflow in menu.
- Fix for DSOLink error.

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

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

* Fri Oct 31 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.0.2-3
- Fixed Source0 URL

* Sun Oct 26 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.0.2-2
- Add post and postun
- Add BUGS to doc
- Add desktop-file-install
- Change icon to 48x48
- Remove INSTALL from doc

* Sat Oct 25 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.0.2-1
- Initial SPEC file