Accepting request 986737 from home:adra:branches:games

Fix build with python 3.10, Updated build requirements, Build databases, sounds and doc subpackages as noarch (fix rpmlint error), Removed SUSE_ASNEEDED=1 (not needed anymore), Removed support for old openSUSE versions and Fedora

OBS-URL: https://build.opensuse.org/request/show/986737
OBS-URL: https://build.opensuse.org/package/show/games/gnubg?expand=0&rev=35
This commit is contained in:
Christopher Hofmann 2022-07-05 09:23:00 +00:00 committed by Git OBS Bridge
parent 03463971a6
commit 2e7c6149f5
2 changed files with 40 additions and 39 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Jul 4 22:14:43 UTC 2022 - Asterios Dramis <asterios.dramis@gmail.com>
- Fix build with python 3.10 (update m4/ax_python_devel.m4). Added
autoconf-archive build requirement for this.
- Added new build requirements: cairo-devel, libcurl-devel and
pkgconfig.
- Replaced libcanberra-devel build requirement with correct
libcanberra-gtk-devel.
- Build databases, sounds and doc subpackages as noarch (fix
rpmlint error).
- Removed SUSE_ASNEEDED=1 (not needed anymore).
- Removed support for old openSUSE versions and Fedora.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 3 05:25:24 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com> Mon Feb 3 05:25:24 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package gnubg # spec file for package gnubg
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2022 SUSE LLC
# Copyright (c) 2003 Achim Mueller, Germany. # Copyright (c) 2003 Achim Mueller, Germany.
# Updated by Christopher Hofmann in 2010 # Updated by Christopher Hofmann in 2010
# #
@ -28,41 +28,32 @@ URL: http://www.gnubg.org
Source: http://gnubg.org/media/sources/gnubg-release-%{version}-sources.tar.gz Source: http://gnubg.org/media/sources/gnubg-release-%{version}-sources.tar.gz
Source1: %{name}.desktop Source1: %{name}.desktop
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: automake BuildRequires: automake
BuildRequires: bison BuildRequires: bison
BuildRequires: cairo-devel
BuildRequires: flex BuildRequires: flex
BuildRequires: freetype2-devel BuildRequires: freetype2-devel
BuildRequires: glibc-devel BuildRequires: glibc-devel
%if 0%{?suse_version} != 1230
BuildRequires: glu-devel BuildRequires: glu-devel
BuildRequires: gtkglext-devel
%endif
BuildRequires: gmp-devel BuildRequires: gmp-devel
BuildRequires: libcanberra-devel BuildRequires: gtkglext-devel
BuildRequires: libcanberra-gtk-devel
BuildRequires: libcurl-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: sqlite3-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtk+-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1120
BuildRequires: libpng-devel >= 1.4
%else
BuildRequires: libpng-devel
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
Recommends: gnubg-databases = %{version}
Recommends: gnubg-sounds = %{version}
Recommends: gnubg-doc = %{version}
Recommends: python3-MySQL-python
BuildRequires: sqlite3-devel
%endif
%if 0%{?fedora}
BuildRequires: sqlite-devel
%endif
Recommends: %{name}-lang Recommends: %{name}-lang
Recommends: gnubg-databases = %{version}
Recommends: gnubg-doc = %{version}
Recommends: gnubg-sounds = %{version}
Recommends: python3-MySQL-python
%description %description
Program for playing and analysing backgammon positions, games and matches. It is Program for playing and analysing backgammon positions, games and matches. It is
@ -77,6 +68,7 @@ Summary: Bearoff databases for gnubg
License: GPL-3.0-or-later License: GPL-3.0-or-later
Group: Amusements/Games/Board/Other Group: Amusements/Games/Board/Other
Requires: %{name} = %{version} Requires: %{name} = %{version}
BuildArch: noarch
%description databases %description databases
Precalculated GNU Backgammon bearoff databases - its intelligence. If you prefer Precalculated GNU Backgammon bearoff databases - its intelligence. If you prefer
@ -88,6 +80,7 @@ Summary: Sounds for gnubg
License: GPL-3.0-or-later License: GPL-3.0-or-later
Group: Amusements/Games/Board/Other Group: Amusements/Games/Board/Other
Requires: %{name} = %{version} Requires: %{name} = %{version}
BuildArch: noarch
%description sounds %description sounds
Sounds for GNU Backgammon. See description of gnubg for more details. Sounds for GNU Backgammon. See description of gnubg for more details.
@ -96,6 +89,7 @@ Sounds for GNU Backgammon. See description of gnubg for more details.
Summary: Documentation for gnubg Summary: Documentation for gnubg
License: GFDL-1.3-only License: GFDL-1.3-only
Group: Amusements/Games/Board/Other Group: Amusements/Games/Board/Other
BuildArch: noarch
%description doc %description doc
Manual for GNU Backgammon. See description of gnubg for more details. Manual for GNU Backgammon. See description of gnubg for more details.
@ -109,60 +103,53 @@ Manual for GNU Backgammon. See description of gnubg for more details.
if [ -f %{_datadir}/aclocal/glib-gettext.m4 ]; then if [ -f %{_datadir}/aclocal/glib-gettext.m4 ]; then
rm m4/glib-gettext.m4 rm m4/glib-gettext.m4
fi fi
# Replace ax_python_devel.m4 for compatibility with Python 3.10.
rm -f m4/ax_python_devel.m4
cp -a %{_datadir}/aclocal/ax_python_devel.m4 m4/
%build %build
autoreconf -fi autoreconf -fi
export SUSE_ASNEEDED=1
simd=no simd=no
%ifarch %ix86 x86_64 %ifarch %{ix86} x86_64
simd=sse2 simd=sse2
%endif %endif
%configure --docdir=%{_docdir}/%{name} --enable-simd=$simd %configure --docdir=%{_docdir}/%{name} --enable-simd=$simd
make %{?_smp_mflags} %make_build
%install %install
%make_install %make_install
DOC="ABOUT-NLS COPYING NEWS README TODO"
install -m 0644 $DOC %{buildroot}/%{_docdir}/%{name}/
%if 0%{?suse_version}
%suse_update_desktop_file -i %{name} %suse_update_desktop_file -i %{name}
%endif
%find_lang %{name} %find_lang %{name}
%files %files
%defattr(-,root,root) %license COPYING
%doc NEWS README TODO
%{_bindir}/* %{_bindir}/*
%{_mandir}/man?/%{name}* %{_mandir}/man?/%{name}*
%{_mandir}/man?/bearoffdump.* %{_mandir}/man?/bearoffdump.*
%{_mandir}/man?/makebearoff.* %{_mandir}/man?/makebearoff.*
%{_mandir}/man?/makehyper.* %{_mandir}/man?/makehyper.*
%{_mandir}/man?/makeweights.* %{_mandir}/man?/makeweights.*
%if 0%{?suse_version}
%{_datadir}/applications/gnubg.desktop %{_datadir}/applications/gnubg.desktop
%endif
%{_datadir}/icons/hicolor/*/apps/gnubg.png %{_datadir}/icons/hicolor/*/apps/gnubg.png
%{_datadir}/gnubg %{_datadir}/gnubg
%attr(755, -, root) %{_datadir}/gnubg/scripts/query_player.sh %attr(755,-,root) %{_datadir}/gnubg/scripts/query_player.sh
%exclude %{_datadir}/gnubg/*.bd %exclude %{_datadir}/gnubg/*.bd
%exclude %{_datadir}/gnubg/sounds %exclude %{_datadir}/gnubg/sounds
%doc %{_docdir}/%{name} %{_docdir}/%{name}
%exclude %{_docdir}/%{name}/images %exclude %{_docdir}/%{name}/images
%exclude %{_docdir}/%{name}/gnubg.html %exclude %{_docdir}/%{name}/gnubg.html
%exclude %{_docdir}/%{name}/allabout.html %exclude %{_docdir}/%{name}/allabout.html
%files databases %files databases
%defattr(-,root,root)
%{_datadir}/gnubg/*.bd %{_datadir}/gnubg/*.bd
%files sounds %files sounds
%defattr(-,root,root)
%{_datadir}/gnubg/sounds %{_datadir}/gnubg/sounds
%files doc %files doc
%defattr(-,root,root)
%doc %{_docdir}/%{name}/images %doc %{_docdir}/%{name}/images
%doc %{_docdir}/%{name}/gnubg.html %doc %{_docdir}/%{name}/gnubg.html
%doc %{_docdir}/%{name}/allabout.html %doc %{_docdir}/%{name}/allabout.html