Name:			swell-foop
Summary:		GNOME Swell Foop (Same GNOME)
Summary(ja):	さめ GNOME
Version:		3.16.1
Release:		1%{?_dist_release}
License:		GPLv2
Group:			Applications/Games
URL:			https://live.gnome.org/Swell%20Foop
Source:			ftp://ftp.gnome.org/pub/gnome/sources/%{name}/3.16/%{name}-%{version}.tar.xz

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

BuildRequires:	gtk3-devel
BuildRequires:	clutter-gtk-devel
BuildRequires:	yelp-tools
BuildRequires:	vala

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

Vendor:			Project Vine
Distribution:	Vine Linux
Packager:		Takemikaduchi

%description
Swell Foop is a puzzle game, previously known as Same GNOME. The goal is to
remove the objects in as few moves as possible. Similar objects that are
adjacent to each other are removed as a group. The remaining objects then
collapse to fill in the gaps and new groups are formed. You cannot remove
single objects. 


%prep
%setup -q

%build
%configure 
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
%{_bindir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.swell-foop.gschema.xml
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/*/*/*


%changelog
* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.0-1
- new upstream release

* Sat May 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release

* Tue Aug 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release
- change permission

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

