File lomiri-cmake-extras.spec of Package lomiri-cmake-extras

#
# spec file for package lomiri-cmake-extras
#
# 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/
#


Name:           lomiri-cmake-extras
Version:        0.0.1.20220112
Release:        0
Summary:        CMake Extras
License:        GPL-3.0-only
URL:            https://gitlab.com/ubports/core/cmake-extras
Source0:        cmake-extras-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  fdupes
BuildRequires:  pkg-config

%description
A collection of add-ons for the CMake build tool.

%package CopyrightTest
Summary:        CMake Extras
Requires:       devscripts
%description CopyrightTest
A drop-in tool to verify that every source file in a selected
directory contains conformant copyright notices.

%package CoverageReport
Summary:        CMake Extras
Requires:       (gcc or clang)
%description CoverageReport
Creates a special coverage report build taget for GCC or clang.

%package DoxygenBuilder
Summary:        CMake Extras
Requires:       doxygen
%description DoxygenBuilder
Creates Doxygen API doc generation targets.

%package FormatCode
Summary:        CMake Extras
Requires:       (clang-tools or astyle)
%description FormatCode
Adds a target to format code using either astyle or clang-format.
The default format is the Unity 8 code format style.

%package GDbus
Summary:        CMake Extras
Requires:       pkgconfig(gio-2.0)
%description GDbus
Finds the gdbus-codegen tool.

%package GMock
Summary:        CMake Extras
%description GMock
Locates the gmock libraries and adds appropriate variables to
the environment.

%package GObjectIntrospection
Summary:        CMake Extras
%description GObjectIntrospection
GObjectIntrospection add-on for CMake.

%package GSettings
Summary:        CMake Extras
%description GSettings
Creates targets for generating and installing GSettings schemata.

%package IncludeChecker
Summary:        CMake Extras
Requires:       clang
%description IncludeChecker
Checks includes.

%package Intltool
Summary:        CMake Extras
Requires:       gettext-runtime
%description Intltool
Integration of internationalization tools.

%package Lcov
Summary:        CMake Extras
%description Lcov
Finds the lcov tool.

%package QmlPlugins
Summary:        CMake Extras
Requires:       pkgconfig(Qt5Qml)
Requires:       libqt5-qtdeclarative-tools
%description QmlPlugins
CMake snippets for supporting QML plugins.

%package Vala
Summary:        CMake Extras
%description Vala
Vala add-on for the CMake build tool.

%package gcovr
Summary:        CMake Extras
%description gcovr
Finds the gcovr script.

%prep
%setup -q -n cmake-extras-%{version}/

%build
#Patch qmlplugindump binary name
sed -i 's/find_program(qmlplugindump_exe qmlplugindump/find_program(qmlplugindump_exe qmlplugindump-qt5/' src/QmlPlugins/QmlPluginsConfig.cmake
#Use the python binary linked at /usr/bin/python
sed -i 's|/usr/bin/env python|/usr/bin/python|' src/IncludeChecker/include_checker.py
%cmake ..
%cmake_build

%install
%cmake_install
%fdupes %{buildroot}%{_prefix}

%files CopyrightTest
%license LICENSE
%{_datadir}/cmake/CopyrightTest/

%files CoverageReport
%license LICENSE
%{_datadir}/cmake/CoverageReport/

%files DoxygenBuilder
%license LICENSE
%{_datadir}/cmake/DoxygenBuilder/

%files FormatCode
%license LICENSE
%{_datadir}/cmake/FormatCode/

%files GDbus
%license LICENSE
%{_datadir}/cmake/GDbus/

%files GMock
%license LICENSE
%{_datadir}/cmake/GMock/

%files GObjectIntrospection
%license LICENSE
%{_datadir}/cmake/GObjectIntrospection/

%files GSettings
%license LICENSE
%{_datadir}/cmake/GSettings/

%files IncludeChecker
%license LICENSE
%{_datadir}/cmake/IncludeChecker/

%files Intltool
%license LICENSE
%{_datadir}/cmake/Intltool/

%files Lcov
%license LICENSE
%{_datadir}/cmake/Lcov/

%files QmlPlugins
%license LICENSE
%{_datadir}/cmake/QmlPlugins/

%files Vala
%license LICENSE
%{_datadir}/cmake/Vala/

%files gcovr
%license LICENSE
%{_datadir}/cmake/gcovr/


%changelog
openSUSE Build Service is sponsored by