File five-or-more.spec of Package five-or-more
#
# spec file for package five-or-more
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: five-or-more
Version: 3.10.1
Release: 0
Summary: "Five or More" Game for GNOME
License: GPL-2.0+
Group: Amusements/Games/Board/Puzzle
Url: http://www.gnome.org
Source0: http://download.gnome.org/sources/five-or-more/3.10/%{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: intltool >= 0.35.0
BuildRequires: itstool
# Needed for gnome-games-create-post
BuildRequires: gnome-games-scripts
BuildRequires: libxml2-tools
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.0
BuildRequires: pkgconfig(librsvg-2.0) >= 2.32.0
# five-or-more used to be called 'glines' and was part of gnome-games until 3.7.x.
Obsoletes: glines < %{version}
Obsoletes: glines-lang < %{version}
Recommends: %{name}-lang
Requires(pre): pwdutils
%glib2_gsettings_schema_requires
%description
Five or More is a game where one must align colored pieces as the
board gets filled with randomly placed pieces. When five or more
pieces of the same color get lined up, they disappear. The game ends
when the board gets filled up all the way.
%lang_package
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
%make_install
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file glines
%{_bindir}/gnome-games-create-post %{buildroot}
%pre
getent group games >/dev/null || groupadd -r games
getent passwd games >/dev/null || useradd -r -g games -d /var/games -s /sbin/nologin
%post -f glines.scores_post
%set_permissions %{_bindir}/%{name}
%glib2_gsettings_schema_post
%icon_theme_cache_post
%desktop_database_post
%verifyscript
%verify_permissions -e %{_bindir}/%{name}
%postun
%glib2_gsettings_schema_postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc %{_datadir}/help/C/%{name}/
%{_datadir}/%{name}/
%dir %{_datadir}/appdata
%{_datadir}/appdata/five-or-more.appdata.xml
%{_datadir}/applications/glines.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.five-or-more.gschema.xml
%{_datadir}/icons/hicolor/*/apps/five-or-more.*
%{_mandir}/man6/%{name}.6%{?ext_man}
%defattr (0755, games, games)
# WARNING: If you are modifying this list, don't forget to edit the
# %%post/%%verifyscript scripts for set_permissions/verify_permissions.
%verify(not mode) %{_bindir}/%{name}
%defattr (0664, games, games)
# WARNING: If you are modifying this list,
# don't forget to remove obsolete scores in %%post.
%ghost %{_localstatedir}/games/glines.Large.scores
%ghost %{_localstatedir}/games/glines.Medium.scores
%ghost %{_localstatedir}/games/glines.Small.scores
%files lang -f %{name}.lang
%changelog