LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File enigma.spec of Package enigma (Project games)

# spec file for package enigma
# 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/

Name:           enigma
Version:        1.01
Release:        0
Summary:        An Excellent Oxyd Clone
License:        GPL-2.0+
Group:          Amusements/Games/Action/Arcade
Url:            http://www.nongnu.org/enigma/
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}-help.desktop
Source2:        %{name}.desktop
Source3:        %{name}.png
Source4:        %{name}-help.png
Source5:        enigma_de.pdf
Source6:        french_russian.tar.bz2
# PATCH-FIX-UPSTREAM enigma-1.01-missing-return.patch
Patch0:         %{name}-1.01-missing-return.patch
# PATCH-FIX-UPSTREAM enigma-1.01-constchar.patch
Patch1:         %{name}-1.01-constchar.patch
# PATCH-FIX-UPSTREAM enigma-1.01-includes.patch
Patch2:         %{name}-1.01-includes.patch
# PATCH-FIX-UPSTREAM enigma-1.01-xerces3.patch
Patch3:         %{name}-1.01-xerces3.patch
# PATCH-FIX-UPSTREAM enigma-1.01-gcc47.patch
Patch4:         %{name}-1.01-gcc47.patch
# PATCH-FIX-UPSTREAM enigma-1.01-png15.patch
Patch5:         %{name}-1.01-png15.patch
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  Xerces-c-devel
BuildRequires:  automake
%if 0%{?suse_version} > 1030
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libpng-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Enigma is similar to the well known game Oxyd.

%setup -q
%patch4 -p1
%patch5 -p1

# autoconf needed for Xerces
make %{?_smp_mflags}

make DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_prefix}/lib %{buildroot}%{_includedir}
rm -f  %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/enigma.png
rm -f  %{buildroot}%{_libdir}/libenet.a
install -D -m 644 $RPM_SOURCE_DIR/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -D -m 644 $RPM_SOURCE_DIR/%{name}-help.png %{buildroot}%{_datadir}/pixmaps/%{name}-help.png
%if 0%{?suse_version}
%suse_update_desktop_file -i %{name}
%suse_update_desktop_file -i %{name}-help
mkdir -p %{buildroot}%{_defaultdocdir}
mv %{buildroot}%{_datadir}/doc/enigma/ %{buildroot}%{_defaultdocdir}/%{name}
install -m 644 %{SOURCE5} %{buildroot}%{_defaultdocdir}/%{name}
tar -xjf %{SOURCE6} -C %{buildroot}%{_defaultdocdir}/%{name}
%if 0%{?suse_version} > 1030
%fdupes %{buildroot}%{_datadir}
%find_lang %{name}

%files -f %{name}.lang
%doc %{_defaultdocdir}/%{name}