File aisleriot.spec of Package aisleriot

# spec file for package aisleriot
# Copyright (c) 2011 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

Name:           aisleriot
Version:        3.2.1
Release:        1
# FIXME: the %%{_datadir}/help/$locale/ files should be found by %%find_lang
License:        GPLv3+
Summary:        Solitaire Card Games for GNOME
Group:          Amusements/Games/Board/Card
# We add the 256x256 png icon for freecell from gnome-games version 2.91.3
# tarball manually until upstream solves bgo#657280
Source1:        gnome-freecell.png
# PATCH-FIX-UPSTREAM aisleriot-automagic-guile.patch bgo#658159 -- Automatically detect version of guile
Patch1:         aisleriot-automagic-guile.patch
# needed by patch1
BuildRequires:  gnome-common
BuildRequires:  guile-devel
BuildRequires:  intltool
BuildRequires:  itstool
BuildRequires:  lsb-release
# Needed to get lsb data
BuildRequires:  dummy-release
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(sm)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Aisleriot is a compilation of 80 different solitaire card games.

%package themes
License:        GPLv3+
Summary:        Solitaire Card Games for GNOME -- Extra Themes
Group:          Amusements/Games/Board/Card
Requires:       %{name} = %{version}
Enhances:       %{name}
BuildArch:      noarch

%description themes
Aisleriot is a compilation of 80 different solitaire card games.

This package provides extra themes for Aisleriot.

%setup -q
%if 0%{?suse_version} > 1140
%patch1 -p1

%if 0%{?suse_version} > 1140
# needed by patch1
%configure \
    --disable-schemas-install \
make %{?_smp_mflags}

%suse_update_desktop_file -N "FreeCell" -G "Solitaire" freecell
%suse_update_desktop_file -N "AisleRiot" -G "Solitaire" sol
if [ -f %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/gnome-freecell.png ];
   then echo "Destination already exists. Perhaps fixed upstream? Please remove hack.";
cp %{S:1} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/
%find_lang %{name} %{?no_lang_C}
# Localized help
for help in %{buildroot}%{_datadir}/help/*/aisleriot/; do
    LOCALE=`echo $help | sed "s:.*%{_datadir}/help/\([^/]*\)/aisleriot/:\1:g"`
    echo "%%lang($LOCALE) %%dir %%{_datadir}/help/$LOCALE" >> %{name}.help-lang.tmp
    echo "%%lang($LOCALE) %%doc /${help##%{buildroot}}" >> %{name}.help-lang.tmp
echo "%%defattr(-,root,root)" > %{name}.help-lang
sort -u %{name}.help-lang.tmp | grep -v "^%%lang(C)" >> %{name}.help-lang

%pre -f aisleriot.schemas_pre


%posttrans -f aisleriot.schemas_posttrans

%preun -f aisleriot.schemas_preun


%files -f aisleriot.schemas_list
%defattr(-, root, root)
%if 0%{?suse_version} <= 1140
%doc %dir %{_datadir}/help
%doc %dir %{_datadir}/help/C
%doc %{_datadir}/help/C/aisleriot/
%dir %{_libdir}/aisleriot
# Exclude files that are in themes
%exclude %{_datadir}/aisleriot/cards/anglo.svg
%exclude %{_datadir}/aisleriot/cards/anglo_bitmap.svg
%exclude %{_datadir}/aisleriot/cards/bellot.svg
%exclude %{_datadir}/aisleriot/cards/bonded.svg
%exclude %{_datadir}/aisleriot/cards/dondorf.svg
%exclude %{_datadir}/aisleriot/cards/gnomangelo_bitmap.svg
%exclude %{_datadir}/aisleriot/cards/ornamental.svg

%files themes
%defattr(-, root, root)

%files lang -f aisleriot.lang -f %{name}.help-lang

openSUSE Build Service is sponsored by