File extra-cmake-modules.spec of Package extra-cmake-modules
#
# spec file for package extra-cmake-modules
#
# Copyright (c) 2020 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/
#
%global debug_package %{nil}
%define _tar_path 5.67
Name: extra-cmake-modules
Version: 5.67.0
Release: 0
Summary: CMake modules
License: BSD-3-Clause
Group: Development/Tools/Other
URL: https://www.kde.org
Source: https://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.5
BuildRequires: gcc-c++
Requires: cmake >= 3.5
Requires: gcc-c++
## WHY?
# Provides: kf5umbrella = 4.99.0
# Obsoletes: kf5umbrella < 4.99.0
%description
Extra modules and scripts for CMake.
For more information see https://community.kde.org/KDE_Core/Platform_11/Buildsystem/FindFilesSurvey
%prep
%setup -q
%build
# % cmake_kf5 -d build
%define cmake_cflags -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG
%define cmake_lflags -Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None -DKDE_INSTALL_USE_QT_SYS_PATHS=OFF \
-DCMAKE_C_FLAGS='%{cmake_cflags}' -DCMAKE_CXX_FLAGS='%{cmake_cflags}' \
-DCMAKE_EXE_LINKER_FLAGS='-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions' \
-DCMAKE_MODULE_LINKER_FLAGS='%{cmake_lflags}' -DCMAKE_SHARED_LINKER_FLAGS='%{cmake_lflags}' \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr -DKDE_INSTALL_LIBDIR=lib64 \
-DKDE_INSTALL_SYSCONFDIR=/etc -DKDE_INSTALL_QTPLUGINDIR=lib64/qt5/plugins \
-DKDE_INSTALL_PLUGINDIR=lib64/qt5/plugins -DKDE_INSTALL_QMLDIR=lib64/qt5/qml \
-DKDE_INSTALL_QTQUICKIMPORTSDIR=lib64/qt5/imports \
-DECM_MKSPECS_INSTALL_DIR=/usr/lib64/qt5/mkspecs/modules \
-DKDE_INSTALL_METAINFODIR=/usr/share/metainfo \
-DBUILD_TESTING=OFF ..
/usr/bin/make VERBOSE=1
%install
# % kf5_makeinstall -C build
cd build
DESTDIR=$RPM_BUILD_ROOT cmake -P cmake_install.cmake
%files
%{_datadir}/ECM/
%changelog