Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 222573bbc480d3a20f405339f62934cf > files > 8

biniax-1.2-7.fc13.src.rpm

Name:		biniax
Version:	1.2
Release:	7%{?dist}
Summary:	A unique arcade logic game

Group:		Amusements/Games
License:	zlib
URL:		http://www.biniax.com/
Source0:	http://mordred.dir.bg/%{name}/%{name}-src.zip
Source1:	%{name}.desktop
# Icon taken from the source, icon.ico
Source2:	%{name}.png
# Fixes the path in gfx.c, snd.c. and creates a ~/.biniax subdir 
# with "autosave" and "highscore" data. Patches send to upstream!
Patch0:		%{name}-%{version}-gfx.patch
Patch1:		%{name}-%{version}-snd.patch
Patch2:		%{name}-%{version}-save.patch
Patch3:		%{name}-%{version}-optflags.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:	hicolor-icon-theme
BuildRequires:	SDL-devel SDL_mixer-devel desktop-file-utils

%description
The gaming field is 5x7 pairs of elements. Every pair consists of two elements 
out of four possible types (colors). Player is a single element, who can move on
empty fields or can take a pair, if the player's element is present in the pair.
If a pair is taken, the player's element is swapped to the other element of the 
pair. The field is scrolling down on time event or after certain moves are spend
(depending on the game mode). Game over is when there is no move for the player.


%prep
%setup -q -c -n %{name}
%patch0 -p0 -b .gfx
%patch1 -p0 -b .snd
%patch2 -p0 -b .save
%patch3 -p0 -b .optflags
# Needed because of this rpmlint warning "W: wrong-file-end-of-line-encoding"
sed -i 's/\r//' Readme.txt LICENSE.txt
# Set datadir prefix, snd.patch and gfx.patch
sed -i 's!@DATADIR@!%{_datadir}!' desktop/gfx.c
sed -i 's!@DATADIR@!%{_datadir}!' desktop/snd.c


%build

make %{?_smp_mflags}


%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}/data

install -p -m 755 biniax %{buildroot}%{_bindir}/%{name}
install -p -m 644 data/* %{buildroot}%{_datadir}/%{name}/data/


# 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


%clean
rm -rf %{buildroot}


%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.txt Readme.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%changelog
* Mon Oct 26 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 1.2-7
- Re-import to Fedora

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Oct 25 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.2-4
- Add datadir prefix, snd.patch and gfx.patch
- Remove obsolete desktop-file-install --vendor="fedora"

* Sat Oct 25 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.2-3
- Cosmetic corrections

* Sat Oct 18 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.2-2
- Add fix for "W: wrong-file-end-of-line-encoding"
- Add RPM_OPT_FLAGS patch
- Add more macros to spec
- Add more info to .desktop file
- Changed summary
- Remove BuildRequires: dos2unix

* Tue Aug 05 2008 Stefan Posdzich <cheekyboinc@foresightlinux.org> - 1.2-1
- Initial SPEC file