File tiled.spec of Package tiled

# spec file for package tiled
# Copyright (c) 2018 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

Name:           tiled
Version:        1.1.5
Release:        0
Summary:        A tilemap editor
License:        GPL-2.0+
Group:          Productivity/Graphics/Other
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libQt5OpenGL-devel
BuildRequires:  libqt5-linguist
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  shared-mime-info
BuildRequires:  zlib-devel
Recommends:     tmxtools
Provides:       tiled-qt

Tiled is a general purpose tile map editor. It is built to work with
varying game engines, whether your game is an RPG, platformer or
Breakout clone. Tiled is written in C++, using the Qt application

%package -n tmxtools
Summary:        Commandline Tools for Tiled MapEditor
License:        BSD-2-Clause
Group:          Productivity/Graphics/Other

%description -n tmxtools
This package contains tmxviewer, a simple application to view Tiled maps
and tmxrasterizer which is also a command line tool.

%package -n libtiled1
Summary:        Library for Tiled MapEditor
License:        BSD-2-Clause
Group:          Development/Libraries/C and C++

%description -n libtiled1
This package contains libtiled a library for the Tiled map editor.

%setup -q
# Remove copy of zlib
rm -rf src/zlib

qmake-qt5 -r PREFIX=%{_prefix} LIBDIR=%{_libdir} RPATH=no USE_FHS_PLUGIN_PATH=yes

make %{?_smp_mflags}

make install INSTALL_ROOT=%{buildroot}

# Clean build artefacts
find -name ".uic" -or -name ".moc" -or -name ".rcc" | xargs rm -rf

# locale files
%find_lang %{name} --with-qt

# Removed development file (this version does not install headers anyway)
rm %{buildroot}%{_libdir}/lib%{name}.so

# Remove duplicates
%fdupes %{buildroot}%{_datadir}

# Install software gallery metadata
install -Dm0644 tiled.appdata.xml %{buildroot}%{_datadir}/appdata/tiled.appdata.xml

%post -n libtiled1 -p /sbin/ldconfig
%postun -n libtiled1 -p /sbin/ldconfig

%if 0%{?suse_version} > 1130


%files -f %{name}.lang
%dir %{_datadir}/appdata/
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/translations

%files -n libtiled1

%files -n tmxtools
%dir %{_datadir}/thumbnailers/
%dir %{_datadir}/metainfo/

openSUSE Build Service is sponsored by