LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package enigma
#
# 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:           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
%endif
BuildRequires:  gcc-c++
BuildRequires:  libpng-devel
%if 0%{?suse_version} >= 1310
BuildRequires:  libpng-tools
%endif
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Enigma is similar to the well known game Oxyd.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1

%build
# autoconf needed for Xerces
autoconf
%configure
make %{?_smp_mflags}

%install
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
%endif
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}
%endif
%find_lang %{name}
%if 0%{?suse_version} >= 1310
%png_fix_dir %{buildroot}/%{_datadir}/enigma
%endif

%files -f %{name}.lang
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%{_bindir}/enigma
%{_mandir}/man6/enigma.6.*
%{_datadir}/enigma/
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png

%changelog