File Reaction.spec of Package Reaction
#
# spec file for package Reaction
#
# Copyright (c) 2016 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: Reaction
Version: 1.0
Release: 0
Summary: A port of the classic Action Quake 2 to a modified Quake 3 engine
License: GPL-2.0
Group: Amusements/Games/3D/Shoot
Url: http://www.rq3.com
Source0: http://download.rq3.com/Reaction-%{version}-source.tar.gz
Patch0: Reaction-1.0~beta1-LIBDIR.patch
BuildRequires: hicolor-icon-theme
BuildRequires: libjpeg8-devel
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(ogg)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(zlib)
Requires: Reaction-data = %{version}
%description
Reaction was originally called Reaction Quake 3 which was a "total conversion mod"
for Quake III Arena based on action and realism with a specific emphasis on action
over realism. Reaction is a port of the classic Action Quake 2 (AQ2) mod.
%prep
%setup -q -n reaction
%patch0
%build
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}"; export CXXFLAGS
make %{?_smp_mflags} \
DEFAULT_BASEDIR="%{_datadir}/Reaction/" \
DEFAULT_LIBDIR="%{_libdir}/Reaction/" \
USE_INTERNAL_SPEEX=0 \
USE_INTERNAL_ZLIB=0 \
USE_INTERNAL_JPEG=0 \
USE_LOCAL_HEADERS=0 \
V=1
%install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_libdir}/Reaction/
mkdir -p %{buildroot}%{_datadir}/Reaction/
make copyfiles COPYBINDIR=%{buildroot}%{_bindir}/ COPYLIBDIR=%{buildroot}%{_libdir}/Reaction/ COPYDIR=%{buildroot}%{_datadir}/Reaction/ NO_STRIP=1
mv %{buildroot}%{_bindir}/Reactionded.* %{buildroot}%{_bindir}/Reactionded
mv %{buildroot}%{_bindir}/Reaction.* %{buildroot}%{_bindir}/Reaction
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
install -p -m 644 Reaction.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
mkdir -p %{buildroot}%{_datadir}/applications/
# create the desktop file without distribution specific macros
cat >> %{buildroot}%{_datadir}/applications/Reaction.desktop <<EOF
[Desktop Entry]
Categories=Game;ActionGame;
Name=Reaction
GenericName=Movie realism FPS
Type=Application
Exec=Reaction
Icon=Reaction
EOF
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING.txt GPL
%{_bindir}/Reaction
%{_bindir}/Reactionded
%{_libdir}/Reaction/
%{_datadir}/Reaction/
%{_datadir}/icons/hicolor/48x48/apps/Reaction.png
%{_datadir}/applications/Reaction.desktop
%changelog