File pmars.spec of Package pmars

#
# spec file for package pmars
#
# Copyright (c) 2017 SUSE LINUX 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 http://bugs.opensuse.org/
#


Name:           pmars
Version:        0.9.2
Release:        0
Summary:        The reference implementation of Corewar
License:        GPL-2.0
Group:          Amusements/Games/Strategy/Other
Url:            http://www.corewars.org/
Source:         %{name}-%{version}.tar.bz2
Source1:        http://vyznev.net/corewar/guide.html
BuildRequires:  xorg-x11-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Corewar is a game played vicariously through the action of
assembly language programs written in a language called Redcode.

%prep
%setup -q
cp -a %{SOURCE1} doc

%build
cd src
make

%install
install -D -m 0755 src/%{name} %{buildroot}%{_prefix}/games/%{name}
install -D -m 0644 doc/%{name}.6 %{buildroot}%{_mandir}/man6/%{name}.6
mkdir -p %{buildroot}%{_datadir}/games/%{name}
cp -ra config %{buildroot}%{_datadir}/games/%{name}/config
cp -ra warriors %{buildroot}%{_datadir}/games/%{name}/warriors

%files
%defattr(-,root,root)
%doc AUTHORS CONTRIB COPYING ChangeLog README
%doc doc/corewar-faq.html doc/primer.* doc/redcode.ref doc/whatsnew.080 doc/guide.html
%doc %{_mandir}/man6/*
%{_prefix}/games
%{_prefix}/games/%{name}
%{_datadir}/games/%{name}/

%changelog
openSUSE Build Service is sponsored by