File tux_aqfh.spec of Package tux_aqfh

#
# spec file for package tux_aqfh
#
# Copyright (c) 2014 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:           tux_aqfh
Version:        1.0.14
Release:        0
Summary:        Tuxedo The Penguin: A Quest for Herring
License:        GPL-2.0
Group:          Amusements/Games/3D/Shoot
Url:            http://tuxaqfh.sourceforge.net/
Source0:        http://downloads.sourceforge.net/tuxaqfh/tuxaqfh/%{version}-classic/%{name}-%{version}.tar.gz
Source1:        %{name}.desktop
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
%endif
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  plib-devel
BuildRequires:  libXi-devel
BuildRequires:  libXmu-devel

%description
Tuxedo The Penguin: A Quest for Herring

A 3D search/explore game staring Tux the Linux Penguin and his girlfriend Gown
as they solve problems and search a number of 3D levels for Golden Herring.

Authors:
--------
    Steve Baker <sjbaker1@airmail.net>

%prep
%setup -q

# Fix libraries
sed -i -e 's|-lplibul|-lplibul -lplibjs|' \
    -i -e 's|datadir/games|datadir|' configure.in

# Fix paths
find -exec grep -q "$(datadir)/games" {} \; \
     -exec sed -i 's|$(datadir)/games|$(datadir)|' {} \;
find -exec grep -q "$(prefix)/games" {} \; \
     -exec sed -i 's|$(prefix)/games|$(prefix)/bin|' {} \;

# Don't install documentation
find -exec grep -q "doc contrib" {} \; \
     -exec sed -i 's|doc contrib|contrib|' {} \;

%build
%{?suse_update_config:%{suse_update_config}}
autoreconf -fi

%configure
make %{?_smp_mflags}
make %{?_smp_mflags} check

%install
%make_install

# install icon
install -Dm 0644 doc/snap3tb.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

# install Desktop file
install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop

%if 0%{?suse_version}
    %suse_update_desktop_file %{name}
    %fdupes -s %{buildroot}%{_prefix}
%endif

%files
%defattr(-,root,root)
%doc AUTHORS CHANGES LICENSE README doc/*.png doc/*.html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by