File gnubg.spec of Package gnubg

# spec file for package gnubg
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2003 Achim Mueller, Germany.
# Updated by Christopher Hofmann in 2010
# 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:           gnubg
Version:        1.04.001
Release:        0
Summary:        Plays and analyzes backgammon games and matches on a world class level
License:        GPL-3.0+
Group:          Amusements/Games/Board/Other
Source1:        %{name}.desktop
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  freetype2-devel
BuildRequires:  glibc-devel
%if 0%{?suse_version} != 1230
BuildRequires:  glu-devel
BuildRequires:  gtkglext-devel
BuildRequires:  gmp-devel
BuildRequires:  libcanberra-devel
BuildRequires:  libpng-devel
BuildRequires:  libtool
BuildRequires:  python-devel
BuildRequires:  readline-devel
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1120
BuildRequires:  libpng-devel >= 1.4
BuildRequires:  libpng-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
Recommends:     gnubg-databases = %{version}
Recommends:     gnubg-sounds = %{version}
Recommends:     gnubg-doc = %{version}
Recommends:     python-MySQL-python
BuildRequires:  sqlite3-devel
%if 0%{?fedora}
BuildRequires:  sqlite-devel
Recommends:     %{name}-lang

Program for playing and analysing backgammon positions, games and matches. It is
based on a neural network. It currently plays at about the level of a
championship flight tournament player. Depending on its parameters and its luck
in recent games, it rates from around 1900 to 2000 on FIBS, the First Internet
Backgammon Server -- at its strongest, it ranks in the top 5 of over 6000 rated
players there and is gradually improving.

%package databases
Summary:        Bearoff databases for gnubg
License:        GPL-3.0+
Group:          Amusements/Games/Board/Other
Requires:       %{name} = %{version}

%description databases
Precalculated GNU Backgammon bearoff databases - its intelligence. If you prefer
a stronger or weaker opponent calculate you own with tweaked parameters
according to the documentation.

%package sounds
Summary:        Sounds for gnubg
License:        GPL-3.0+
Group:          Amusements/Games/Board/Other
Requires:       %{name} = %{version}

%description sounds
Sounds for GNU Backgammon. See description of gnubg for more details.

%package doc
Summary:        Documentation for gnubg
License:        GFDL-1.3
Group:          Amusements/Games/Board/Other

%description doc
Manual for GNU Backgammon. See description of gnubg for more details.


%setup -q gnubg
# if we have a glib-gettext.m4 installed in the system, we drop the
# local copy in gnubg. It certainly is older
if [ -f %{_datadir}/aclocal/glib-gettext.m4 ]; then
  rm m4/glib-gettext.m4

autoreconf -fi
%configure --docdir=%{_docdir}/%{name}
make %{?_smp_mflags}


install -m 0644 $DOC %{buildroot}/%{_docdir}/%{name}/

%if 0%{?suse_version}
%suse_update_desktop_file -i %{name}
%find_lang %{name}


%if 0%{?suse_version}
%attr(755, -, root) %{_datadir}/gnubg/scripts/
%exclude %{_datadir}/gnubg/*.bd
%exclude %{_datadir}/gnubg/sounds
%doc %{_docdir}/%{name}
%exclude %{_docdir}/%{name}/images
%exclude %{_docdir}/%{name}/gnubg.html
%exclude %{_docdir}/%{name}/allabout.html

%files databases

%files sounds

%files doc
%doc %{_docdir}/%{name}/images
%doc %{_docdir}/%{name}/gnubg.html
%doc %{_docdir}/%{name}/allabout.html

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by