Blob Blame History Raw
Name:           arrows
Version:        0.6
Release:        3%{?dist}
Summary:        Neat little maze game
Group:          Amusements/Games
License:        GPL
URL:            http://noreason.ca/?file=software
Source0:        http://noreason.ca/data/arrows-%{version}.tar.gz
Source1:        arrows.desktop
Source2:        arrows.png
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  gtk2-devel desktop-file-utils
Requires:       hicolor-icon-theme

%description
It's a maze game of sorts. Guide the spinning blue thing through
the maze of arrows, creating and destroying arrows as necessary
to collect the green things.


%prep
%setup -q
make clean


%build
make %{?_smp_mflags} CCOPTS="$RPM_OPT_FLAGS"


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}

# 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/24x24/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/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 LICENSE README
%{_bindir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/24x24/apps/%{name}.png


%changelog
* Sat Nov 25 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6-3
- Honor $RPM_OPT_FLAGS (bz 225098)

* Sat Nov 25 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6-2
- Add Requires hicolor-icon-theme, drop GNOME from desktop catagories
  (bz 217239)

* Sat Nov 25 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6-1
- Initial FE package