Blob Blame History Raw
%global icon_themes    hicolor HighContrast

Name:           four-in-a-row
Version:        3.10.0
Release:        1%{?dist}
Summary:        GNOME Four-in-a-row game

License:        GPLv2+ and GFDL
URL:            http://projects.gnome.org/gnome-games/
Source0:        http://download.gnome.org/sources/four-in-a-row/3.10/four-in-a-row-%{version}.tar.xz

BuildRequires:  desktop-file-utils
BuildRequires:  intltool
BuildRequires:  itstool
BuildRequires:  gtk3-devel
BuildRequires:  libcanberra-devel
BuildRequires:  librsvg2-devel
Buildrequires:  zlib-devel

Obsoletes: gnome-games-extra < 1:3.7.92-1
Obsoletes: gnome-games-gnect < 1:3.7.92-1

%description
The objective of Four-in-a-row is to build a line of four of your marbles
while trying to stop your opponent (human or computer) building a line
of his or her own.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}


%install
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/gnect.desktop

%find_lang %{name} --all-name --with-gnome


%post
for t in %{icon_themes} ; do
  touch --no-create %{_datadir}/icons/$t &>/dev/null || :
done


%postun
if [ $1 -eq 0 ]; then
  for t in %{icon_themes} ; do
    touch --no-create %{_datadir}/icons/$t &> /dev/null
    gtk-update-icon-cache %{_datadir}/icons/$t &> /dev/null || :
  done
  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi


%posttrans
for t in %{icon_themes} ; do
  gtk-update-icon-cache %{_datadir}/icons/$t &>/dev/null || :
done
glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :


%files -f %{name}.lang
%doc COPYING
%{_bindir}/four-in-a-row
%{_datadir}/appdata/four-in-a-row.appdata.xml
%{_datadir}/applications/gnect.desktop
%{_datadir}/four-in-a-row
%{_datadir}/glib-2.0/schemas/org.gnome.four-in-a-row.gschema.xml
%{_datadir}/icons/HighContrast/*/apps/four-in-a-row.*
%{_datadir}/icons/hicolor/*/apps/four-in-a-row.*
%{_mandir}/man6/four-in-a-row.6*


%changelog
* Mon Sep 23 2013 Yanko Kaneti <yaneti@declera.com> - 3.10.0-1
- Update to 3.10.0

* Tue Sep 17 2013 Yanko Kaneti <yaneti@declera.com> - 3.9.92-1
- Update to 3.9.92
- Add appdata.

* Tue Aug 20 2013 Yanko Kaneti <yaneti@declera.com> - 3.9.90-1
- Update to 3.9.90

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jun 22 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.1-2
- Obsolete gnome-games-extra (for upgrades from f17)

* Mon Apr 15 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.1-1
- Update to 3.8.1

* Wed Mar 27 2013 Yanko Kaneti <yaneti@declera.com> - 3.8.0-1
- Update to 3.8.0
- Drop po patch

* Tue Mar 19 2013 Yanko Kaneti <yaneti@declera.com> - 3.7.92-1
- Update to 3.7.92

* Wed Mar  6 2013 Yanko Kaneti <yaneti@declera.com> - 3.7.90-1
- Initial packaging of standalone four-in-a-row