3 %bcond_without tests # build without tests
5 %define orgname extra-cmake-modules
6 %define kdeframever 5.80
7 Summary: Extra Cmake Modules for KF5
8 Summary(pl.UTF-8): Dodatkowe moduły Cmake'a dla KF5
13 Group: Development/Building
14 Source0: http://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
15 # Source0-md5: d01a78f68ee5a1458f783d90ef3116f1
16 Patch0: %{orgname}-tests.patch
17 Patch1: kdefetchtranslations-test.patch
18 URL: http://www.kde.org/
19 BuildRequires: cmake >= 3.5
20 BuildRequires: qt5-assistant >= 5.9.0
21 BuildRequires: qt5-linguist
22 BuildRequires: rpmbuild(macros) >= 1.698
23 BuildRequires: sed >= 4.0
24 BuildRequires: sphinx-pdg >= 1.2
25 BuildRequires: tar >= 1:1.22
28 BuildRequires: Qt5Core-devel >= 5.9.0
29 BuildRequires: Qt5Gui-devel >= 5.9.0
30 BuildRequires: Qt5Network-devel >= 5.9.0
31 BuildRequires: Qt5Qml-devel >= 5.9.0
32 BuildRequires: Qt5Quick-devel >= 5.9.0
33 BuildRequires: libstdc++-devel >= 6:5
34 BuildRequires: qt5-build >= 5.9.0
36 Obsoletes: kf5-extra-cmake-modules-doc
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 The Extra CMake Modules package, or ECM, adds to the modules provided
42 by CMake, including both ones used by find_package() to find common
43 software and ones that can be used directly in CMakeLists.txt files to
46 In addition, it provides common build settings used in software
47 produced by the KDE community.
49 While the driving force of this module is to reduce duplication in
50 CMake scripts across KDE software, it is intended to be useful for any
51 software that uses the CMake build system.
53 %description -l pl.UTF-8
54 Pakiet Extra CMake Modules (ECM) dostarcza dodatkowe moduły do tych
55 dostarczanych przez CMake'a, zawierające te używane przez
56 find_package() do szukania popularnego oprogramowania, a także takie,
57 których można używać bezpośrednio w CMakeLists.txt do wykonywania
60 Ponadto pakiet dostarcza wspólne ustawienia budowana używane w
61 oprogramowaniu tworzonym przez społeczność KDE.
63 O ile główną motywacją tego modułu jest zmniejszenie duplikacji w
64 skryptach CMake'a w oprogramowaniu KDE, ma także być przydatny dla
65 dowolnych programów wykorzystujących system budowania CMake.
68 %setup -q -n %{orgname}-%{version}
72 # causes make install failure after running tests
73 %{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
79 %{!?with_tests:-DBUILD_TESTING=OFF} \
85 # GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
86 # ECMPoQmToolsTest fails to build it's own moc file
87 ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)'
91 rm -rf $RPM_BUILD_ROOT
93 %{__make} -C build -j1 install \
94 DESTDIR=$RPM_BUILD_ROOT
96 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/pre-commit.in
97 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/clang-format.sh
99 %{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
100 install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories5
103 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %doc COPYING-CMAKE-SCRIPTS README.rst ECM-doc/*
109 %{_datadir}/qlogging-categories5
110 %{_mandir}/man7/ecm*.7*