File liquidwar6.spec of Package liquidwar6
#
# spec file for package liquidwar6
#
# Copyright (c) 2013 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/
#
Name: liquidwar6
Version: 0.0.13
Release: 0
Summary: A unique multiplayer wargame
License: GPL-2.0+
Group: Amusements/Games/Strategy/Other
Url: http://www.gnu.org/software/liquidwar6
Source: %{name}-%{version}beta.tar.bz2
Source2: %{name}-extra-maps-%{version}beta.zip
# PATCH-FIX-UPSTREAM liquidwar6-libpng16.patch
Patch0: %{name}-libpng16.patch
BuildRequires: Mesa-devel
# guile-devel >= 1.8 AND < 3
BuildRequires: guile-devel < 3
BuildRequires: libcurl-devel
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: sqlite3-devel
BuildRequires: texinfo
BuildRequires: texlive
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} < 1120
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: SDL_ttf-devel
%else
BuildRequires: fdupes
BuildRequires: libSDL-devel
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_mixer-devel
BuildRequires: libSDL_ttf-devel
%endif
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} <= 1210
BuildRequires: google-perftools-devel
%endif
%if 0%{?suse_version} > 1210
BuildRequires: gperftools-devel
%endif
BuildRequires: automake
BuildRequires: graphviz
BuildRequires: graphviz-gd
BuildRequires: graphviz-gnome
BuildRequires: libtool
Requires: guile
Requires(pre): %install_info_prereq
%define extramaps %{_datadir}/%{name}-%{version}beta/map/extra
%description
Liquid War 6 is a unique multiplayer wargame. Your army is a blob of
liquid and you have to try and eat your opponents. Rules are very
simple yet original, they have been invented by Thomas Colcombet. It
is possible to play alone against the computer but the game is really
designed to be played with friends, on a single computer, on a LAN, or
on Internet.
%package extramaps
Summary: Extra maps for Liquid War 6
Group: Amusements/Games/Strategy/Other
Requires: %{name} = %{version}
%description extramaps
Additional maps for Liquid War 6 package
# Preparation of the package
%prep
%setup -q -n %{name}-%{version}beta
%patch0 -p1
unzip %{SOURCE2}
autoreconf -fi
# Building the package
%build
%if 0%{?suse_version} >= 1210
export CFLAGS="-I/usr/include/guile/2.0 $CFLAGS %{optflags}"
%endif
%configure --enable-allinone --enable-optimize --disable-static --disable-rpath --disable-mod-csound
make %{?_smp_mflags}
cd doc
make liquidwar6.html liquidwar6.pdf
# Installing the package
%install
make DESTDIR=%{buildroot} install
mv %{buildroot}%{_bindir}/%{name}-%{version}beta %{buildroot}%{_bindir}/%{name}
%suse_update_desktop_file %{name} Game StrategyGame
# No devel stuff or tests in this RPM
rm -rf %{buildroot}%{_includedir}/%{name}
%if 0%{?suse_version} < 1120
rm -rf %{buildroot}%{_libdir}/%{name}*test
%else
rm -rf %{buildroot}%{_prefix}/lib/%{name}*test
%endif
mkdir %{buildroot}/%{extramaps}
cp -r *maps*/* %{buildroot}/%{extramaps}
%if 0%{?suse_version} >= 1120
%fdupes -s %{buildroot}%{_datadir}
%endif
%find_lang %{name}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/liquidwar6.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/liquidwar6.info.gz
%files -f %{name}.lang
%defattr(-,root,root)
%doc ChangeLog README NEWS COPYING AUTHORS
%{_datadir}/doc/%{name}
%docdir %{_datadir}/doc/%{name}
%{_infodir}/%{name}.info.gz
%{_bindir}/%{name}
%exclude %{extramaps}
%{_datadir}/%{name}-%{version}beta
%{_mandir}/man6/%{name}.6.gz
%{_datadir}/applications/liquidwar6.desktop
%{_infodir}/liquidwar6.info-*.gz
%{_datadir}/pixmaps/liquidwar6.png
%{_datadir}/pixmaps/liquidwar6.xpm
%files extramaps
%defattr(-,root,root)
%doc %{extramaps}/*.txt
%{extramaps}
%exclude %{extramaps}/*.txt
%changelog