File mingw32-qt6-svg.spec of Package mingw32-qt6-svg

#
# spec file for package mingw32-qt6-svg
#
# Copyright (c) 2021 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 real_version 6.2.3
%define short_version 6.2
%define tar_name qtsvg-everywhere-src
%define tar_suffix %{nil}
#
%global qt6_flavor @BUILD_FLAVOR@%{nil}
%if "%{qt6_flavor}" == "docs"
%define pkg_suffix -docs
%endif
#
%define _name   qt6-svg%{?pkg_suffix}
Name:           mingw32-%{_name}
Version:        6.2.3
Release:        0
Summary:        Classes for rendering and displaying SVG drawings
License:        LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later)
URL:            https://www.qt.io
Source:         https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
Source99:       mingw32-qt6-svg-rpmlintrc
BuildRequires:  mingw32-cross-pkgconf
BuildRequires:  mingw32-qt6-core-private-devel
BuildRequires:  mingw32-qt6-gui-private-devel
BuildRequires:  mingw32-qt6-widgets-private-devel
BuildRequires:  mingw32(cmake:Qt6Core)
BuildRequires:  mingw32(cmake:Qt6Gui)
BuildRequires:  mingw32(cmake:Qt6Widgets)
BuildRequires:  mingw32(pkg:zlib)
# Ignored: only used for building tests
# BuildRequires:  cmake(Qt6Xml)
%if "%{qt6_flavor}" == "docs"
BuildRequires:  mingw32-qt6-tools
%{_mingw32_qt6_doc_packages}
%endif
%_mingw32_package_header_debug
BuildArch:      noarch

%description
The Qt SVG module provides classes for rendering and displaying SVG drawings
in widgets and on other paint devices.

%if !%{qt6_docs_flavor}

%package -n mingw32-libQt6Svg6
Summary:        Qt 6 Svg library

%description -n mingw32-libQt6Svg6
The Qt 6 Svg library.

%package -n mingw32-libQt6SvgWidgets6
Summary:        Qt 6 SVGWidgets library

%description -n mingw32-libQt6SvgWidgets6
The Qt 6 SvgWidgets library.

# TODO split?
%package devel
Summary:        Qt 6 SVG libraries - Development files
Requires:       mingw32-libQt6Svg6 = %{version}
Requires:       mingw32-libQt6SvgWidgets6 = %{version}
# Dependencies are not detected
Requires:       mingw32(cmake:Qt6Core)
Requires:       mingw32(cmake:Qt6Gui)
Requires:       mingw32(cmake:Qt6Widgets)

%description devel
Development files for the Qt 6 SVG libraries.

%package private-devel
Summary:        Non-ABI stable API for the Qt 6 SVG libraries
Requires:       mingw32(cmake:Qt6Svg) = %{real_version}
Requires:       mingw32(cmake:Qt6SvgWidgets) = %{real_version}
%requires_eq    mingw32-qt6-core-private-devel
%requires_eq    mingw32-qt6-gui-private-devel
%requires_eq    mingw32-qt6-widgets-private-devel

%description private-devel
This package provides private headers of libQt6Svg that do not have any
ABI or API guarantees.

%{mingw32_qt6_examples_package}

%endif

%_mingw32_debug_package

%prep
%autosetup -p1 -n %{tar_name}-%{real_version}%{tar_suffix}

%build
%_mingw32_cmake_qt6

%{_mingw32_qt6_build}

%install
%{_mingw32_qt6_install}

%if !%{qt6_docs_flavor}

# No private headers for Qt6SvgWidgets
rm %{buildroot}%{_mingw32_qt6_mkspecsdir}/modules/qt_lib_svgwidgets_private.pri


%files -n mingw32-libQt6Svg6
%license LICENSE.*
%dir %{_mingw32_qt6_pluginsdir}/iconengines
%dir %{_mingw32_qt6_pluginsdir}/imageformats
%{_mingw32_qt6_pluginsdir}/iconengines/libqsvgicon.dll
%{_mingw32_qt6_pluginsdir}/imageformats/libqsvg.dll
%{_mingw32_qt6_bindir}/libQt6Svg.dll

%files -n mingw32-libQt6SvgWidgets6
%{_mingw32_qt6_bindir}/libQt6SvgWidgets.dll

%files devel
%{_mingw32_qt6_cmakedir}/Qt6BuildInternals/StandaloneTests/QtSvgTestsConfig.cmake
%{_mingw32_qt6_cmakedir}/Qt6Gui/*
%{_mingw32_qt6_cmakedir}/Qt6Svg/
%{_mingw32_qt6_cmakedir}/Qt6SvgWidgets/
%{_mingw32_qt6_descriptionsdir}/Svg.json
%{_mingw32_qt6_descriptionsdir}/SvgWidgets.json
%{_mingw32_qt6_includedir}/QtSvg/
%{_mingw32_qt6_includedir}/QtSvgWidgets/
%{_mingw32_qt6_libdir}/libQt6Svg.prl
%{_mingw32_qt6_libdir}/libQt6Svg.dll.a
%{_mingw32_qt6_libdir}/libQt6SvgWidgets.prl
%{_mingw32_qt6_libdir}/libQt6SvgWidgets.dll.a
%{_mingw32_qt6_metatypesdir}/qt6svg_*_metatypes.json
%{_mingw32_qt6_metatypesdir}/qt6svgwidgets_*_metatypes.json
%{_mingw32_qt6_mkspecsdir}/modules/qt_lib_svg.pri
%{_mingw32_qt6_mkspecsdir}/modules/qt_lib_svgwidgets.pri
%exclude %{_mingw32_qt6_includedir}/QtSvg/%{real_version}/

%files private-devel
%dir %{_mingw32_qt6_includedir}/QtSvg/
%{_mingw32_qt6_includedir}/QtSvg/%{real_version}/
%{_mingw32_qt6_mkspecsdir}/modules/qt_lib_svg_private.pri

%endif

%changelog
openSUSE Build Service is sponsored by