]> git.pld-linux.org Git - packages/kf5-extra-cmake-modules.git/blobdiff - kf5-extra-cmake-modules.spec
- updated URL and cmake version
[packages/kf5-extra-cmake-modules.git] / kf5-extra-cmake-modules.spec
index 3cd29aaafcd3c2ee5cdcb18f030cb2ae9d03e8b8..8e7f457e091ce0620bc32cb78f7fa0e40dd76b35 100644 (file)
@@ -3,26 +3,40 @@
 %bcond_without tests           # build without tests
 
 %define                orgname         extra-cmake-modules
-%define                kdeframever     5.4
+%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:       1.4.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: a8a8278f5448a584cffec07692ed9f19
-URL:           http://www.kde.org/
-BuildRequires: cmake >= 2.8.12
+Source0:       https://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
+# Source0-md5: cee2ba8f60aa01fe0f4eb9b6304c1a5b
+Patch0:                %{orgname}-tests.patch
+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
-BuildRequires: sphinx-pdg
+BuildRequires: sed >= 4.0
+BuildRequires: sphinx-pdg >= 1.2
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
+%if %{with tests}
+BuildRequires: Qt5Core-devel >= 5.9.0
+BuildRequires: Qt5Gui-devel >= 5.9.0
+BuildRequires: Qt5Network-devel >= 5.9.0
+BuildRequires: Qt5Qml-devel >= 5.9.0
+BuildRequires: Qt5Quick-devel >= 5.9.0
+BuildRequires: libstdc++-devel >= 6:5
+BuildRequires: qt5-build >= 5.9.0
+%endif
+Obsoletes:     kf5-extra-cmake-modules-doc
+BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                qt5dir          %{_libdir}/qt5
-
 %description
 The Extra CMake Modules package, or ECM, adds to the modules provided
 by CMake, including both ones used by find_package() to find common
@@ -36,24 +50,54 @@ While the driving force of this module is to reduce duplication in
 CMake scripts across KDE software, it is intended to be useful for any
 software that uses the CMake build system.
 
+%description -l pl.UTF-8
+Pakiet Extra CMake Modules (ECM) dostarcza dodatkowe moduły do tych
+dostarczanych przez CMake'a, zawierające te używane przez
+find_package() do szukania popularnego oprogramowania, a także takie,
+których można używać bezpośrednio w CMakeLists.txt do wykonywania
+wspólnych zadań.
+
+Ponadto pakiet dostarcza wspólne ustawienia budowana używane w
+oprogramowaniu tworzonym przez społeczność KDE.
+
+O ile główną motywacją tego modułu jest zmniejszenie duplikacji w
+skryptach CMake'a w oprogramowaniu KDE, ma także być przydatny dla
+dowolnych programów wykorzystujących system budowania CMake.
+
 %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} \
+       ..
+
 %{__make}
 
-%{?with_tests:%{__make} test}
+%if %{with tests}
+# GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
+# ECMPoQmToolsTest fails to build it's own moc file
+ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)'
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} -C build/ install \
+
+%{__make} -C build -j1 install \
         DESTDIR=$RPM_BUILD_ROOT
 
-mv $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
+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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -62,4 +106,5 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc COPYING-CMAKE-SCRIPTS README.rst ECM-doc/*
 %{_datadir}/ECM
+%{_datadir}/qlogging-categories5
 %{_mandir}/man7/ecm*.7*
This page took 0.050426 seconds and 4 git commands to generate.