File gbrainy.spec of Package gbrainy

# spec file for package gbrainy
# 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

# norootforbuild

Name:           gbrainy
Version:        1.61
Release:        3
License:        GPLv2+
Source:         %{name}-%{version}.tar.bz2
Patch:          gbrainy-use-libexecdir.patch
# PATCH-FIX-UPSTREAM gbrainy-fix-build.patch -- Taken from git, to fix build with mono 2.8
Patch1:         gbrainy-fix-build.patch
PreReq:         filesystem
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gtk-sharp2
BuildRequires:  intltool
BuildRequires:  librsvg-devel
BuildRequires:  mono-devel
BuildRequires:  mono-addins
Group:          Amusements/Games/Logic
Summary:        A brain teaser game and trainer
%if 0%{?suse_version}
BuildRequires:  glade-sharp2 gnome-sharp2
BuildRequires:  update-desktop-files
%define suse_update_desktop_file true
%if 0%{?fedora_version}
BuildRequires:  gnome-sharp-devel gtk-sharp2-devel
Recommends:     %{name}-lang
# For the help system to work, we require a ghelp:// URI handler.
Recommends:     mimehandler(x-scheme-handler/ghelp)

gbrainy is a brain teaser game and trainer to have fun and to keep
your brain trained.

It provides the following types of games:

* Logic puzzles. Games designed to challenge your reasoning and
  thinking skills.

* Mental calculation. Games based on arithmetical operations
  designed to prove your mental calculation skills.

* Memory trainers. Games designed to challenge your short term

* Verbal analogies. Games that challenge your verbal aptitude.

%setup -q
%patch1 -p1


export MONO_SHARED_DIR=/var/tmp
%configure --disable-static

%suse_update_desktop_file %name Game
%find_lang %{name} %{?no_lang_C}
rm -rf $RPM_BUILD_ROOT%{_datadir}/pixmaps
# It's not the right size: 32x32
rm -rf $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/gbrainy.png
# There are no extensions yet, Thus creating a -devel package sounds overkill (file can't reside in noarch package).
rm %{buildroot}%{_libdir}/pkgconfig/gbrainy.pc

rm -rf "$RPM_BUILD_ROOT"

%if 0%{?suse_version} > 1130


%if 0%{?suse_version} > 1130


%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/gbrainy/
%doc %{_datadir}/gnome/help/gbrainy/C/

%files lang -f %{name}.lang