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:        2025.07.13
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
Patch1:         unbundle_boost.patch
Patch2:         unbundle_expat.patch
# Patch5:         unbundle_protobuf.patch
Patch3:         unbundle_glm.patch
Patch4:         unbundle_pugixml.patch
Patch6:         remove_shaders_compiler.patch
Patch7:         unbundle_utf8.patch
Patch8:         jansson_pkgconfig.patch
Patch9:         fix_utf8cpp.patch
Patch10:        rebundle_protobuf.patch
Patch11:        rebundle_fast_double_parser.patch
Patch12:        0001-Add-calls-to-UNREACHABLE-to-fix-compilation-with-Wer.patch
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  gflags-devel
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(xcursor)
BuildRequires:  pkgconfig(xinerama)
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
%cmake_qt6 -DUNITY_DISABLE=OFF -DSKIP_TESTS=ON -DSKIP_TOOLS=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON -DWITH_SYSTEM_PROVIDED_3PARTY:BOOL=ON

%qt6_build

%install
%qt6_install
%fdupes %{buildroot}/%{_prefix}
%suse_update_desktop_file app.organicmaps.desktop

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

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

%changelog

openSUSE Build Service is sponsored by