bastet/bastet.spec
2010-01-21 14:38:23 +00:00

119 lines
3.1 KiB
RPMSpec

Name: bastet
Version: 0.43
Release: 7%{?dist}
Summary: An evil falling bricks game
Group: Amusements/Games
License: GPLv3+
URL: http://fph.altervista.org/prog/bastet.html
Source0: http://fph.altervista.org/prog/files/%{name}-%{version}.tgz
Source1: %{name}.desktop
# self-made icon
Source2: %{name}.png
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: boost-devel ncurses-devel desktop-file-utils
%description
Bastet is a simple ncurses-based falling bricks like game. Unlike
normal, however, Bastet does not choose your next brick at random.
Instead, it uses a special algorithm designed to choose the worst
brick possible. As you can imagine, playing Bastet can be a very
frustrating experience!
%prep
%setup -q
# remove reference to Tetris to match our guidelines
sed -e 's/Tetris(R)/any falling bricks game/g' -e 's/Tetris/falling bricks game/g' \
-e 's/tetris/falling bricks game/g' README > README.new
mv -f README.new README
# remove also any reference to Tetris in the bastet manpage
sed -e 's/Tetris(r)/any falling bricks game/g' -e 's/tetris/falling bricks game/g' \
bastet.6 > bastet.6.new
mv -f bastet.6.new bastet.6
%build
make %{?_smp_mflags} CXXFLAGS="%{optflags}"
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 bastet %{buildroot}%{_bindir}/bastet
# below the desktop file and icon stuff
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE1}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
install -p -m 0644 %{SOURCE2} \
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
# manpage
mkdir -p %{buildroot}%{_mandir}/man6/
install -p -m 0644 %{name}.6 \
%{buildroot}%{_mandir}/man6/%{name}.6
%clean
rm -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_mandir}/man6/*
%changelog
* Thu Jan 21 2010 Jon Ciesla <limb@jcomserv.net> - 0.43-7
- Rebuild for new boost.
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.43-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Jun 06 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.43-5
- Changed CFLAGS to CXXFLAGS
* Fri Jun 05 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.43-4
- Added new icon cache scriptlets
- Added optflags
- Changed license to GPLv3+
- Removed manually gzip of manpage
* Thu Jun 04 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.43-3
- Add manpage
- Removed reference to Tetris in the bastet manpage
* Mon Jun 01 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.43-2
- Removed reference to Tetris to match our guidelines
* Mon Jun 01 2009 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 0.43-1
- Initial SPEC file