Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > a7e83a7dd48498029958b8d44ab9d431 > files > 3

npush-0.7-4.fc12.src.rpm

Name:		npush
Version:	0.7
Release:	4%{?dist}
Summary:	A logic game similar to Sokoban

Group:		Amusements/Games
License:	GPLv2+
URL:		http://npush.sourceforge.net/
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
# patch npush.cpp to fix an issue with level path
Patch0:		npush-0.7-level.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	ncurses-devel desktop-file-utils

%description
nPush is a logic game similar to Sokoban and Boulder Dash. 
You need to collect all the gold on the level and reach the exit. 
To make it hard there are some rocks that stand in your way,
and you also have some dynamite to blast them away. 
Main difference from Sokoban, KSokoban and similar games is that you 
can have multiple player-controlled characters you can move on the screen.

nPush is a terminal based application and uses nCurses library for 
user interface.


%prep
%setup -q
%patch0 -p0

%build

make %{?_smp_mflags} CFLAGS="${RPM_OPT_FLAGS}"


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p  %{buildroot}%{_bindir}
install -p -m 755 npush %{buildroot}%{_bindir}/npush

mkdir -p %{buildroot}%{_datadir}/npush
cp -ra levels*  %{buildroot}%{_datadir}/npush

# desktop file stuff
desktop-file-install --vendor="fedora" \
	--add-category="LogicGame" \
	--delete-original \
	--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
	%{name}.desktop

# icon
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps

install -p -m 0644 %{name}.png				\
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/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 CHANGES COPYING CREDITS readme.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

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

* Fri Apr 10 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.7-3
- Fix Bug #485363

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

* Sat Jul 12 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.7-1
- Update to 0.7
- Upstream now ships our .desktop an icon file
- Add npush-0.7-level.patch to fix level path
- Remove obsolete npush-0.6-level-svn.patch

* Mon Jul 07 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.6-1
- Initial SPEC file