]>
Commit | Line | Data |
---|---|---|
01d13c31 ER |
1 | # |
2 | # Conditional build: | |
53d00b1b | 3 | %bcond_without tests # build without tests |
071895c0 | 4 | |
23845e79 | 5 | %define orgname extra-cmake-modules |
cc4fc263 | 6 | %define kdeframever 5.71 |
23845e79 | 7 | Summary: Extra Cmake Modules for KF5 |
53d00b1b | 8 | Summary(pl.UTF-8): Dodatkowe moduły Cmake'a dla KF5 |
01d13c31 | 9 | Name: kf5-%{orgname} |
cc4fc263 | 10 | Version: 5.71.0 |
41b27b04 | 11 | Release: 1 |
071895c0 AM |
12 | License: BSD |
13 | Group: Development/Building | |
01d13c31 | 14 | Source0: http://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz |
cc4fc263 | 15 | # Source0-md5: 39590c81474016b01ce1bc29fb808c3e |
53d00b1b | 16 | Patch0: %{orgname}-tests.patch |
23845e79 | 17 | URL: http://www.kde.org/ |
cc4fc263 | 18 | BuildRequires: cmake >= 3.5 |
2f178ef3 | 19 | BuildRequires: qt5-assistant >= 5.9.0 |
071895c0 | 20 | BuildRequires: qt5-linguist |
3f354ca4 | 21 | BuildRequires: rpmbuild(macros) >= 1.698 |
53d00b1b JB |
22 | BuildRequires: sed >= 4.0 |
23 | BuildRequires: sphinx-pdg >= 1.2 | |
434fec0f WF |
24 | BuildRequires: tar >= 1:1.22 |
25 | BuildRequires: xz | |
53d00b1b | 26 | %if %{with tests} |
2f178ef3 WF |
27 | BuildRequires: Qt5Core-devel >= 5.9.0 |
28 | BuildRequires: Qt5Gui-devel >= 5.9.0 | |
29 | BuildRequires: Qt5Network-devel >= 5.9.0 | |
30 | BuildRequires: Qt5Qml-devel >= 5.9.0 | |
31 | BuildRequires: Qt5Quick-devel >= 5.9.0 | |
cc4fc263 | 32 | BuildRequires: libstdc++-devel >= 6:5 |
2f178ef3 | 33 | BuildRequires: qt5-build >= 5.9.0 |
53d00b1b | 34 | %endif |
43053bb5 | 35 | Obsoletes: kf5-extra-cmake-modules-doc |
1a1e564e | 36 | BuildArch: noarch |
23845e79 WF |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
23845e79 WF |
39 | %description |
40 | The Extra CMake Modules package, or ECM, adds to the modules provided | |
01d13c31 ER |
41 | by CMake, including both ones used by find_package() to find common |
42 | software and ones that can be used directly in CMakeLists.txt files to | |
43 | perform common tasks. | |
23845e79 WF |
44 | |
45 | In addition, it provides common build settings used in software | |
46 | produced by the KDE community. | |
47 | ||
48 | While the driving force of this module is to reduce duplication in | |
49 | CMake scripts across KDE software, it is intended to be useful for any | |
50 | software that uses the CMake build system. | |
51 | ||
53d00b1b JB |
52 | %description -l pl.UTF-8 |
53 | Pakiet Extra CMake Modules (ECM) dostarcza dodatkowe moduły do tych | |
54 | dostarczanych przez CMake'a, zawierające te używane przez | |
55 | find_package() do szukania popularnego oprogramowania, a także takie, | |
56 | których można używać bezpośrednio w CMakeLists.txt do wykonywania | |
57 | wspólnych zadań. | |
58 | ||
59 | Ponadto pakiet dostarcza wspólne ustawienia budowana używane w | |
60 | oprogramowaniu tworzonym przez społeczność KDE. | |
61 | ||
62 | O ile główną motywacją tego modułu jest zmniejszenie duplikacji w | |
63 | skryptach CMake'a w oprogramowaniu KDE, ma także być przydatny dla | |
64 | dowolnych programów wykorzystujących system budowania CMake. | |
65 | ||
23845e79 WF |
66 | %prep |
67 | %setup -q -n %{orgname}-%{version} | |
53d00b1b JB |
68 | %patch0 -p1 |
69 | ||
70 | # causes make install failure after running tests | |
71 | %{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt | |
23845e79 WF |
72 | |
73 | %build | |
74 | install -d build | |
75 | cd build | |
53d00b1b JB |
76 | %cmake .. \ |
77 | %{!?with_tests:-DBUILD_TESTING=OFF} | |
78 | ||
23845e79 WF |
79 | %{__make} |
80 | ||
53d00b1b JB |
81 | %if %{with tests} |
82 | # GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4 | |
9a54f06a JR |
83 | # ECMPoQmToolsTest fails to build it's own moc file |
84 | ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)' | |
53d00b1b | 85 | %endif |
071895c0 | 86 | |
23845e79 WF |
87 | %install |
88 | rm -rf $RPM_BUILD_ROOT | |
53d00b1b JB |
89 | |
90 | %{__make} -C build -j1 install \ | |
23845e79 WF |
91 | DESTDIR=$RPM_BUILD_ROOT |
92 | ||
53d00b1b | 93 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc |
ed2c6fa7 | 94 | install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories5 |
071895c0 | 95 | |
23845e79 WF |
96 | %clean |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
071895c0 | 101 | %doc COPYING-CMAKE-SCRIPTS README.rst ECM-doc/* |
23845e79 | 102 | %{_datadir}/ECM |
ed2c6fa7 | 103 | %{_datadir}/qlogging-categories5 |
071895c0 | 104 | %{_mandir}/man7/ecm*.7* |