File openxcom.spec of Package openxcom

#
# spec file for package openxcom
#
# Copyright (c) 2018 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:           openxcom
Version:        1.0.0
Release:        0
Summary:        An open source reimplementation of the original X-Com game
License:        GPL-3.0
Group:          Amusements/Games/Strategy/Turn Based
Url:            http://openxcom.org/
# Interesting approach to count downloads http://openxcom.org/file/1726/
Source:         %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: gcc6 compat, taken from git
Patch0:         openxcom-abs.patch
# PATCH-FIX-UPSTREAM include math.h when needed also in git
Patch1:         openxcom-math.patch
BuildRequires:  Mesa-devel
BuildRequires:  SDL-devel
BuildRequires:  SDL_gfx-devel >= 2.0.22
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  docbook2X
BuildRequires:  dos2unix
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  xmlto
BuildRequires:  yaml-cpp-devel >= 0.5

%description
OpenXcom is an open-source clone of the original UFO: Enemy Unknown
(X-Com: UFO Defense in USA), licensed under the GPL and written in C++ / SDL.

The goal of the project is to bring back the tried and true feel of the original
with none of the issues. All the same graphics, sound and gameplay with a brand
new codebase written from scratch.

User is required to have original gamedata (possible to obtain from e.g. Steam)
installed to ~/.local/share/openxcom/data/

%package doc
Summary:        Documentation files for %{name}
Group:          Amusements/Games/Strategy/Turn Based
Requires:       %{name} = %{version}

%description doc
Documentation files for %{name} game.

%prep
%autosetup -p1

chmod -x LICENSE.txt
sed -i \
	-e 's:HTML_TIMESTAMP         = YES:HTML_TIMESTAMP         = NO:g' \
	docs/Doxyfile.in
dos2unix *.txt

%build
%configure \
	--disable-werror \
	--disable-silent-rules \
	--with-docs --docdir="%{_docdir}/%{name}"
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
%fdupes %{buildroot}%{_datadir}

%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt CHANGELOG.txt
%{_datadir}/applications/openxcom.desktop
%{_mandir}/man6/openxcom.6.*
%{_datadir}/pixmaps/openxcom.png
%{_datadir}/pixmaps/openxcom.svg
%{_datadir}/%{name}/
%{_docdir}/%{name}/*.txt
%{_bindir}/%{name}
%dir %{_docdir}/%{name}
%exclude %{_docdir}/%{name}/html/

%files doc
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%dir %{_docdir}/%{name}/html
%{_docdir}/%{name}/html/*

%changelog
openSUSE Build Service is sponsored by