%bcond_without tests # build without tests
%define orgname extra-cmake-modules
-%define kdeframever 5.71
+%define kdeframever 5.86
Summary: Extra Cmake Modules for KF5
Summary(pl.UTF-8): Dodatkowe moduły Cmake'a dla KF5
Name: kf5-%{orgname}
-Version: 5.71.0
+Version: 5.86.0
Release: 1
License: BSD
Group: Development/Building
-Source0: http://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
-# Source0-md5: 39590c81474016b01ce1bc29fb808c3e
+Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
+# Source0-md5: cee2ba8f60aa01fe0f4eb9b6304c1a5b
Patch0: %{orgname}-tests.patch
-URL: http://www.kde.org/
-BuildRequires: cmake >= 3.5
+Patch1: kdefetchtranslations-test.patch
+URL: https://kde.org/
+BuildRequires: cmake >= 3.16
BuildRequires: qt5-assistant >= 5.9.0
BuildRequires: qt5-linguist
BuildRequires: rpmbuild(macros) >= 1.698
%prep
%setup -q -n %{orgname}-%{version}
%patch0 -p1
+%patch1 -p0
# causes make install failure after running tests
%{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
%build
install -d build
cd build
-%cmake .. \
- %{!?with_tests:-DBUILD_TESTING=OFF}
+%cmake \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
+ ..
%{__make}
%{__make} -C build -j1 install \
DESTDIR=$RPM_BUILD_ROOT
+sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/pre-commit.in
+sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/clang-format.sh
+
%{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories5