File pacman.spec of Package pacman

#
# spec file for package pacman
#
# Copyright (c) 2020 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:           pacman
Version:        1.002
Release:        0
Summary:        A Pacman Game
License:        GPL-2.0-only
Group:          Amusements/Games/Action/Arcade
URL:            ftp://ftp.nvg.unit.no/pub/pacman
Source0:        ftp://ftp.nvg.unit.no/pub/pacman/pacman-1_002.tar.gz
# PATCH-FIX-UPSTREAM welcome_to_21_century.patch -- Add return type
Patch0:         welcome_to_21_century.patch
# PATCH-FIX-UPSTREAM segfault.patch -- Fix segfault
Patch1:         segfault.patch
# PATCH-FIX-UPSTREAM iso-cpp.patch -- ISO C++ requires the main function to have the int return type
Patch2:         iso-cpp.patch
BuildRequires:  gcc-c++
BuildRequires:  xorg-x11-devel

%description
Another pacman-game.

%prep
%setup -q -n %{name}-1_002
%patch0
%patch1
%patch2 -p1

%build
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS -std=c++98"
%configure
make %{?_smp_mflags} pacman_LDFLAGS=

%install
%make_install

%files
%doc ChangeLog README
%license COPYING
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by