LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File jag-level-editor.spec of Package jag-level-editor (Project games)

#
# spec file for package jag-level-editor
#
# Copyright (c) 2015 SUSE LINUX 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 oname   jag

Name:           jag-level-editor
Version:        0.3.2
Release:        0
Summary:        Level Editor for the JAG
License:        GPL-3.0+
Group:          Amusements/Games/Logic
Url:            http://jag.xlabsoft.com/
Source0:        http://jag.xlabsoft.com/files/%{oname}-%{version}-src.zip
Source1:        %{name}-icons.tar
Source2:        %{name}.desktop
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  gcc-c++
BuildRequires:  libqt4-devel
BuildRequires:  unzip
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(sdl)
Requires:       %{oname}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The aim of JAG is to break all of the target pieces on each level,
and to do this before the time runs out. Keep doing this until you
have beaten the last level and won the game.

Level Editor for JAG.

%prep
%setup -q -a 1 -n %{oname}-%{version}-src

# SED-FIX-OPENSUSE -- Fix paths and name
sed -i -e 's|/usr/local/bin|/usr/bin|;
           s|jag-editor|jag-level-editor|' editor/editor.pro

%build
cd editor
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags"
make %{?_smp_mflags} CFLAGS="%{optflags} -fgnu89-inline"

%install
cd editor
make INSTALL_ROOT=%{buildroot} install

# install icons
cd ..
for i in 22 32 48 64 72 96 128 256 ; do
    install -Dm 0644 icons/%{name}_${i}x${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done

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

%if 0%{?suse_version}
    %suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/

%changelog