File openorienteering-mapper.spec of Package openorienteering-mapper
#
# spec file for package openorienteering-mapper
#
# Copyright (c) 2025 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/
#
%define _name Mapper
%if 0%{?suse_version} >= 1600
%bcond_without pdf
%endif
Name: openorienteering-mapper
Version: @SERVICE@
Release: 0
Summary: Software for creating maps for the orienteering sport
License: GPL-3.0-or-later
Group: Productivity/Graphics/Other
URL: https://github.com/OpenOrienteering/mapper
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libQt5Gui-private-headers-devel
BuildRequires: libQt5PrintSupport-private-headers-devel
BuildRequires: libxml2-tools
BuildRequires: ninja
BuildRequires: openSUSE-release
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Positioning)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sensors)
BuildRequires: pkgconfig(Qt5SerialPort)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(gdal)
BuildRequires: pkgconfig(polyclipping)
BuildRequires: pkgconfig(proj)
BuildRequires: pkgconfig(zlib)
Requires: gdal
Recommends: kio-extras5
Recommends: %{name}-lang
Suggests: %{name}-doc
Provides: bundled(libMapper_Common)
Provides: bundled(libQtSingleApplication)
Provides: bundled(libcove)
Provides: bundled(libcove-potrace)
Provides: bundled(libcove-vectorizer)
Provides: bundled(libfake_position_source)
Provides: bundled(libmapper-sensors)
Provides: bundled(libnmea_position_source)
Provides: bundled(libpowershell_position_source)
Provides: bundled(libprintsupport)
Provides: bundled(libscaling-icon-engine)
Provides: bundled(mapper-gdal)
%description
OpenOrienteering Mapper is an orienteering mapmaking program and provides a
free and open source alternative to existing commercial software.
OpenOrienteering Mapper runs on Android, Windows, macOS and Linux.
%lang_package
%package doc
Summary: Documentation for %{name}
Group: Documentation/Other
BuildRequires: doxygen
BuildRequires: pkgconfig
BuildRequires: sqlite3
BuildRequires: pkgconfig(Qt5Help)
Requires: %{name} = %{version}-%{release}
Requires: libqt5-qttools
BuildArch: noarch
%if %{with pdf}
BuildRequires: texlive-latex-bin-bin
BuildRequires: texlive-makeindex-bin
BuildRequires: texlive-metafont-bin
BuildRequires: tex(8r.enc)
BuildRequires: tex(adjustbox.sty)
BuildRequires: tex(alphalph.sty)
BuildRequires: tex(changepage.sty)
BuildRequires: tex(enumitem.sty)
BuildRequires: tex(etoc.sty)
BuildRequires: tex(fancyhdr.sty)
BuildRequires: tex(fancyvrb.sty)
BuildRequires: tex(float.sty)
BuildRequires: tex(geometry.sty)
BuildRequires: tex(hanging.sty)
BuildRequires: tex(helvet.sty)
BuildRequires: tex(multirow.sty)
BuildRequires: tex(natbib.sty)
BuildRequires: tex(pcrr8t.tfm)
BuildRequires: tex(phvr8t.tfm)
BuildRequires: tex(sectsty.sty)
BuildRequires: tex(stackengine.sty)
BuildRequires: tex(tabu.sty)
BuildRequires: tex(tabularray.sty)
BuildRequires: tex(tocloft.sty)
BuildRequires: tex(ulem.sty)
BuildRequires: tex(wasy7.tfm)
BuildRequires: tex(wasysym.sty)
BuildRequires: tex(xltabular.sty)
%endif
%description doc
Doxygen generated documentations for %{name}.
%prep
%autosetup -p1
%build
%define __builder ninja
%cmake \
-DMapper_BUILD_CLIPPER:BOOL=OFF \
%{?with_pdf:-DMapper_MANUAL_PDF:BOOL=ON} \
-DCMAKE_INSTALL_DOCDIR="%{_defaultdocdir}/%{name}-doxygen" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-Wno-dev
%cmake_build
%install
%cmake_install
%suse_update_desktop_file -r -n -G "Map drawing software" %{_name} Graphics VectorGraphics
%fdupes -s %{buildroot}%{_datadir}
%find_lang %{name} --with-qt --all-name
%check
%ctest ||:
%files
%doc README.md
%{_bindir}/%{_name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{_name}.??g
%{_datadir}/icons/hicolor/*/mimetypes/application-x-openorienteering-*.png
%{_mandir}/man?/%{_name}.?%{?ext_man}
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/translations
%license COPYING
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%files doc
%doc %{_defaultdocdir}/%{name}-doxygen
%changelog