Name:			gnome-nibbles
Summary:		GNOME Nibbles
Summary(ja):	GNOME Nibbles
Version:		3.8.0
Release:		1%{?_dist_release}
License:		GPLv2
Group:			Applications/Games
URL:			https://live.gnome.org/Nibbles
Source:			ftp://ftp.gnome.org/pub/gnome/sources/%{name}/3.8/%{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires:	gtk3-devel
BuildRequires:	librsvg2-devel
BuildRequires:	clutter-gtk-devel
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	yelp-tools

Requires(postun,posttrans): desktop-file-utils
Requires(postun,posttrans): gtk3

Vendor:			Project Vine
Distribution:	Vine Linux
Packager:		Takemikaduchi

%description
Nibbles is a game where the user controls a snake. The snake moves around the board,
eating diamonds while avoiding the walls placed around it. Nibbles also features
network multiplayer, and up to six evil AI worms! 


%prep
%setup -q

%build
%configure --localstatedir=/var/lib
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

%find_lang %{name} --with-gnome

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch %{_datadir}/icons/hicolor
gtk-update-icon-cache -q %{_datadir}/icons/hicolor > /dev/null || :

%postun
if [ $1 -eq 0 ]; then
  touch %{_datadir}/icons/hicolor
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor > /dev/null || :
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
  update-desktop-database -q > /dev/null || :
fi

%posttrans 
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
update-desktop-database -q > /dev/null || :


%files -f %{name}.lang
%defattr(-, root, root)
%doc  COPYING NEWS
%attr(2551, root, games) %{_bindir}/%{name}
%{_datadir}/applications/gnibbles.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.nibbles.gschema.xml
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/icons/HighContrast/*/apps/%{name}.*
%{_mandir}/man6/%{name}.6.gz
%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/%{name}.*


%changelog
* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.0-1
- initial build

