Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 6ab7233c090d76f0d76e39051491fd8f > files > 8

njam-1.25-12.fc14.src.rpm

Name:           njam
Version:        1.25
Release:        12%{?dist}
Summary:        Maze-game, eat all the cookies while avoiding the badguys
Group:          Amusements/Games
License:        GPLv2+
URL:            http://njam.sourceforge.net/
# should be
# http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
# but that file has got corrupted, hurray for sourceforge :(
Source0:        %{name}-%{version}-src.tar.gz
Source1:        njam.6
Source2:	njam.desktop
Patch0:         njam-1.25-drop-setgid.patch
Patch1:         njam-1.25-html.patch
Patch2:         njam-1.25-leveledit.patch
Patch3:         njam-1.25-gcc45.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL-devel SDL_mixer-devel SDL_image-devel SDL_net-devel 
BuildRequires:  ImageMagick desktop-file-utils
Requires:       hicolor-icon-theme 

%description
Njam is a fast-paced maze-game where you must eat all the cookies while
avoiding the badguys. Special cookies give you the power to freeze or eat the
bad guys. The game features single and multiplayer modes, network play,
duelling and cooperative games, great music and sound effects, customizable
level skins, many different levels and an integrated level editor.


%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1 -z .setgid
%patch1 -p1
%patch2 -p1 -z .leveledit
%patch3 -p1


%build
%configure
make %{?_smp_mflags}
convert -transparent black njamicon.ico %{name}.png


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

# make install installs the docs under /usr/share/njam. We want them in %doc.
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/README
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/levels/readme.txt
rm -fr $RPM_BUILD_ROOT%{_datadir}/%{name}/html

# clean up cruft
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.*
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/njamicon.ico

# we want the hiscore in /var/lib/games
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/games
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/hiscore.dat \
  $RPM_BUILD_ROOT%{_var}/lib/games/%{name}.hs

# add the manpage (courtesy of Debian)
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man6

# 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 \
  %{SOURCE2}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{name}.png \
  $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 ChangeLog NEWS README TODO levels/readme.txt html
%attr(2755,root,games) %{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man6/%{name}.6.gz
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%config(noreplace) %attr (0664,root,games) %{_var}/lib/games/%{name}.hs


%changelog
* Fri Sep 10 2010 Hans de Goede <hdegoede@redhat.com> 1.25-12
- Fix compilation with gcc 4.5

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

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

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

* Fri Aug 31 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-7
- Fix Source0 URL

* Wed Aug 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-6
- Rebuild for buildId

* Sun Aug 12 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-5
- Update License tag for new Licensing Guidelines compliance
- Fix invalid desktop file (fix building with latest desktop-file-utils)

* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-4
- FE6 Rebuild

* Tue May  9 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-3
- Add Patch2, which fixes the leveleditor to save custom made levels under
  $HOME/.njam-levels instead of trying to write them under /usr/share.
  Also teach njam to look for levels under both $HOME/.njam-levels and
  /usr/share (bug 188078).

* Tue Mar 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-2
- Cleaned up description in spec and man using the cleaner
  description provided in bz 186813
- Use cookies instead of dots in summary (bz 186813)
- Put manpage in man6 (bz 186813)
- fix broken home link in doc-editor.html (bz 186813)

* Wed Mar 22 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.25-1
- initial Fedora Extras package