File nexuiz.spec of Package nexuiz
#
# spec file for package nexuiz
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#
#
%define datadate 20091001
%define nexversion 252
Summary: Nexuiz first person shooter
License: GPL-2.0+
Group: Amusements/Games
Name: nexuiz
Version: 2.5.2
Release: 0
Url: http://nexuiz.com/
Source0: nexuiz-%{nexversion}.tar
Source1: nexuiz.desktop
Source2: nexuiz.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: nexuiz-data = %{version}
Requires: nexuiz-engine = %{nexversion}
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
BuildRequires: update-desktop-files
%description
Nexuiz is a fast-paced, chaotic, and intense multiplayer first person shooter,
focused on providing basic, old style deathmatches.
%package data
Summary: Data for the nexuiz first person shooter
Group: Amusements/Games
%description data
Nexuiz is a fast-paced, chaotic, and intense multiplayer first person shooter,
focused on providing basic, old style deathmatches.
Data (textures, maps, sounds and models) required to play nexuiz.
%prep
%setup -q -n %{name}-%{nexversion}
%build
%{__sed} -i 's:nexuiz="nexuiz-linux-${arch}-${mode}":nexuiz="darkplaces-glx -basedir /usr/share/nexuiz -nexuiz":' nexuiz-linux-glx.sh
%{__sed} -i 's:nexuiz="nexuiz-linux-${arch}-${mode}":nexuiz="darkplaces-sdl -basedir /usr/share/nexuiz -nexuiz":' nexuiz-linux-sdl.sh
%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__install} -m 755 nexuiz-linux-glx.sh \
%{buildroot}%{_bindir}/nexuiz-glx
%{__install} -m 755 nexuiz-linux-sdl.sh \
%{buildroot}%{_bindir}/nexuiz-sdl
%{__mkdir_p} %{buildroot}%{_datadir}/nexuiz/data/
%{__mkdir_p} %{buildroot}%{_datadir}/nexuiz/havoc
%{__install} -p havoc/data%{datadate}havoc.pk3 %{buildroot}/%{_datadir}/nexuiz/havoc/
%{__install} -p data/data%{datadate}.pk3 %{buildroot}/%{_datadir}/nexuiz/data/
%{__install} -p data/common-spog.pk3 %{buildroot}/%{_datadir}/nexuiz/data/
%suse_update_desktop_file -i %{name} Game ActionGame
%files
%defattr(-,root,root,-)
%{_bindir}/nexuiz-glx
%{_bindir}/nexuiz-sdl
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%files data
%defattr(0644, root, root, 0755)
%doc Docs/* gpl.txt
%dir %{_datadir}/nexuiz
%dir %{_datadir}/nexuiz/data
%dir %{_datadir}/nexuiz/havoc
%{_datadir}/nexuiz/havoc/data%{datadate}havoc.pk3
%{_datadir}/nexuiz/data/data%{datadate}.pk3
%{_datadir}/nexuiz/data/common-spog.pk3
%changelog