#
# 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 http://bugs.opensuse.org/
#



Name:           aisleriot
Version:        3.1.1
Release:        1
License:        GPLv3+
Summary:        Solitaire Card Games for GNOME
Url:            http://www.gnome.org
Group:          Amusements/Games/Board/Card
Source:         http://download.gnome.org/sources/aisleriot/3.1/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM aisleriot-theme-install.patch bgo#648601 vuntz@opensuse.org -- Let aisleriot know that extra themes are in aisleriot-themes
Patch0:         aisleriot-theme-install.patch
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  guile-devel
BuildRequires:  intltool
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
%gconf_schemas_prereq
%glib2_gsettings_schema_requires

%description
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.

%lang_package
%prep
%setup -q
%patch0 -p1

%build
%configure \
    --disable-schemas-install \
    --disable-static \
    --disable-scrollkeeper
%__make %{?jobs:-j%jobs}

%install
%make_install
%suse_update_desktop_file -N "FreeCell" -G "Solitaire" freecell
%suse_update_desktop_file -N "AisleRiot" -G "Solitaire" sol
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas

%clean
rm -rf %{buildroot}

%pre -f aisleriot.schemas_pre

%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post

%posttrans -f aisleriot.schemas_posttrans

%preun -f aisleriot.schemas_preun

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun

%files -f aisleriot.schemas_list
%defattr(-, root, root)
%doc AUTHORS ChangeLog COPYING-DOCS COPYING.GPL3
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/aisleriot/
%doc %{_datadir}/gnome/help/aisleriot/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/aisleriot/
%doc %{_datadir}/omf/aisleriot/aisleriot-C.omf
%{_bindir}/sol
%{_datadir}/applications/freecell.desktop
%{_datadir}/applications/sol.desktop
%{_datadir}/aisleriot/
%dir %{_libdir}/aisleriot
%{_libdir}/aisleriot/ar-cards-renderer
%{_datadir}/glib-2.0/schemas/org.gnome.Patience.WindowState.gschema.xml
%{_datadir}/icons/hicolor/*/apps/gnome-aisleriot.*
%{_datadir}/icons/hicolor/*/apps/gnome-freecell.*
%{_mandir}/man?/sol.*
# 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)
%{_datadir}/aisleriot/cards/anglo.svg
%{_datadir}/aisleriot/cards/anglo_bitmap.svg
%{_datadir}/aisleriot/cards/bellot.svg
%{_datadir}/aisleriot/cards/bonded.svg
%{_datadir}/aisleriot/cards/dondorf.svg
%{_datadir}/aisleriot/cards/gnomangelo_bitmap.svg
%{_datadir}/aisleriot/cards/ornamental.svg

%files lang -f aisleriot.lang

%changelog