File xgalaga.spec of Package xgalaga
#
# spec file for package xgalaga
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: xgalaga
Version: 2.1.1.0
Release: 0
Summary: A Galaga-clone for X11
License: GPL-2.0-or-later
Group: Amusements/Games/Action/Arcade
URL: http://sourceforge.net/projects/xgalaga/
Source: http://netix.dl.sourceforge.net/project/xgalaga/xgalaga-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-x86_64.patch -- https://sourceforge.net/p/xgalaga-sdl/patches/3/
Patch0: fix-x86_64.patch
# PATCH-FIX-OPENSUSE fix-makefile.patch -- Adjust some pathes
Patch1: fix-makefile.patch
# PATCH-FIX-UPSTREAM fix-insecure-code.patch -- https://sourceforge.net/p/xgalaga/patches/8/
Patch2: fix-insecure-code.patch
BuildRequires: fdupes
BuildRequires: pkg-config
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xpm)
Requires(post): permissions
Provides: xgal
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A clone of the old space arcade game 'Galaga'. (It's Galaga, you know
how to play Galaga! Ship follows the mouse, button fires. Autofire by
holding it down, so no one accuses us of breaking their mouse!)
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure \
--with-xpm-lib=%{_libdir}
make %{?_smp_mflags}
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
touch %{buildroot}%{_datadir}/xgalaga/scores
ln -s %{_mandir}/man6/xgalaga.6x.gz %{buildroot}%{_mandir}/man6/xgalaga-hyperspace.6x.gz
%fdupes %{buildroot}%{_datadir}
%post
%if 0%{?suse_version} <= 1130
%run_permissions
%else
%set_permissions %{_bindir}/xgalaga
%endif
%verifyscript
%verify_permissions -e %{_bindir}/xgalaga
%files
%defattr(-,root,root,-)
%doc CHANGES README README.SOUND
%verify(not mode) %attr(0755,games,games) %{_bindir}/xgalaga*
%{_libdir}/%{name}
%{_datadir}/xgalaga
%attr(0664,root,games) %{_datadir}/xgalaga/scores
%{_mandir}/man6/xgalaga*
%changelog