Blob Blame History Raw
Name:           alphabet-soup
Version:        1.1
Release:        3%{?dist}
Summary:        Guide your worm through the soup to spell words
Group:          Amusements/Games
License:        Crystal Stacker
URL:            http://www.t3-i.com/asoup.htm
Source0:        http://www.t3-i.com/ncdgames/as11src.zip
Source1:        alphabet-soup.desktop
Source2:        alphabet-soup.png
Patch0:         alphabet-soup-1.1-linux.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  alfont-devel dumb-devel desktop-file-utils
Requires:       hicolor-icon-theme

%description
Guide your worm through the soup to spell words and earn points. Play the way
you like with several game mode selections. Words are chosen from one of three
included dictionaries, or import your own.


%prep
%setup -q -c
%patch0 -p1 -z .unix
sed -i 's/\r//' readme.txt


%build
make %{?_smp_mflags} -f Makefile.unix PREFIX=%{_prefix} \
  CFLAGS="$RPM_OPT_FLAGS -fsigned-char -Wno-deprecated-declarations"


%install
rm -rf $RPM_BUILD_ROOT
make -f Makefile.unix install PREFIX=$RPM_BUILD_ROOT%{_prefix}

# 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/48x48/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/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 readme.txt license-change.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png


%changelog
* Fri Aug  3 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-3
- Update License tag for new Licensing Guidelines compliance
- Fix 3 calls of memset with the 2nd and 3th argument swaped,
  reported by Dave Jones

* Sun Dec  3 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-2
- Add dumb-devel to BR (bz 218023)
- Add Requires hicolor-icon-theme (bz 218023)

* Fri Dec  1 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-1
- Initial Fedora Extras package