File organicmaps.spec of Package organicmaps

#
# spec file for package organicmaps
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           organicmaps
Version:        2024.03.05
Release:        0
Summary:        Offline maps app for travelers, tourists, hikers, and cyclists
License:        Apache-2.0
URL:            https://organicmaps.app/
Source:         %{name}-%{version}.tar.xz
Patch0:         configure_remove_boost.patch
Patch1:         unbundle_boost.patch
Patch2:         unbundle_expat.patch
# Patch5:         unbundle_protobuf.patch
Patch3:         unbundle_glm.patch
Patch4:         unbundle_pugixml.patch
Patch5:         remove_android_references.patch
Patch6:         unbundle_jansson.patch
Patch7:         remove_shaders_compiler.patch
Patch8:         unbundle_utf8.patch
Patch9:         fix_error_return_type.patch
Patch10:        unbundle_harfbuzz.patch
%if 0%{?suse_version} > 1500
BuildRequires:  gcc-c++
%else
%define gccversion 11
BuildRequires:  gcc%{gccversion}-c++
%endif
BuildRequires:  boost-devel >= 1.67
BuildRequires:  cmake
BuildRequires:  cmake(glm)
BuildRequires:  pkgconfig(harfbuzz)
BuildRequires:  cmake(pugixml)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Network)
BuildRequires:  cmake(Qt6OpenGL)
BuildRequires:  cmake(Qt6OpenGLWidgets)
BuildRequires:  cmake(Qt6Positioning)
BuildRequires:  cmake(Qt6Svg)
BuildRequires:  cmake(Qt6Xml)
BuildRequires:  cmake(utf8cpp)
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(icu-i18n)
BuildRequires:  pkgconfig(icu-uc)
BuildRequires:  pkgconfig(jansson)
BuildRequires:  pkgconfig(zlib)
# BuildRequires:  pkgconfig(protobuf) >= 3.21.2
BuildRequires:  rsync
BuildRequires:  vulkan-headers
#BuildRequires:  freetype-devel
Requires:       %{name}-data = %{version}

%description
Organic Maps is a free offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware.

%package data
Summary:        Data for OrganicMaps
BuildArch:      noarch

%description data
Data files for OrganicMaps

%prep
%autosetup -p1
echo "echo %{version} | sed 's/\.//g'" > tools/unix/version.sh

%build
%if 0%{?suse_version} <= 1500
export CXX=g++-%{gccversion}
%endif
bash ./configure.sh
%cmake -DUNITY_DISABLE=OFF -DSKIP_TESTS=ON -DSKIP_TOOLS=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON

%cmake_build

%install
%cmake_install
%fdupes %{buildroot}/%{_prefix}
%suse_update_desktop_file OrganicMaps

%files
%license LICENSE NOTICE
%doc README.md
%{_datadir}/icons/hicolor
%{_datadir}/metainfo/app.organicmaps.desktop.metainfo.xml
%{_datadir}/applications/OrganicMaps.desktop
%{_bindir}/OMaps

%files data
%dir %{_datadir}/%{name}
%{_datadir}/%{name}

%changelog

openSUSE Build Service is sponsored by