]> git.pld-linux.org Git - packages/kf5-extra-cmake-modules.git/blob - kf5-extra-cmake-modules.spec
leaving minimal BRs, BC: qmake
[packages/kf5-extra-cmake-modules.git] / kf5-extra-cmake-modules.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # build without doc
4 %bcond_without  tests           # build without tests
5
6 %define         orgname         extra-cmake-modules
7 %define         kdeframever     5.93
8 Summary:        Extra Cmake Modules for KF5
9 Summary(pl.UTF-8):      Dodatkowe moduły Cmake'a dla KF5
10 Name:           kf5-%{orgname}
11 Version:        5.93.0
12 Release:        1
13 License:        BSD
14 Group:          Development/Building
15 Source0:        https://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
16 # Source0-md5:  32ef8ba4ef4bf73b6167a84b0179914f
17 Patch0:         %{orgname}-tests.patch
18 Patch1:         kdefetchtranslations-test.patch
19 URL:            https://kde.org/
20 BuildRequires:  cmake >= 3.16
21 BuildRequires:  qt5-assistant >= 5.9.0
22 BuildRequires:  qt5-linguist
23 BuildRequires:  rpmbuild(macros) >= 1.698
24 BuildRequires:  sed >= 4.0
25 %{?with_doc:BuildRequires:      sphinx-pdg >= 1.2}
26 BuildRequires:  tar >= 1:1.22
27 BuildRequires:  xz
28 %if %{with tests}
29 BuildRequires:  Qt5Core-devel >= 5.9.0
30 BuildRequires:  Qt5Quick-devel >= 5.9.0
31 BuildRequires:  libstdc++-devel >= 6:5
32 %endif
33 BuildConflicts: qmake
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 The Extra CMake Modules package, or ECM, adds to the modules provided
39 by CMake, including both ones used by find_package() to find common
40 software and ones that can be used directly in CMakeLists.txt files to
41 perform common tasks.
42
43 In addition, it provides common build settings used in software
44 produced by the KDE community.
45
46 While the driving force of this module is to reduce duplication in
47 CMake scripts across KDE software, it is intended to be useful for any
48 software that uses the CMake build system.
49
50 %description -l pl.UTF-8
51 Pakiet Extra CMake Modules (ECM) dostarcza dodatkowe moduły do tych
52 dostarczanych przez CMake'a, zawierające te używane przez
53 find_package() do szukania popularnego oprogramowania, a także takie,
54 których można używać bezpośrednio w CMakeLists.txt do wykonywania
55 wspólnych zadań.
56
57 Ponadto pakiet dostarcza wspólne ustawienia budowana używane w
58 oprogramowaniu tworzonym przez społeczność KDE.
59
60 O ile główną motywacją tego modułu jest zmniejszenie duplikacji w
61 skryptach CMake'a w oprogramowaniu KDE, ma także być przydatny dla
62 dowolnych programów wykorzystujących system budowania CMake.
63
64 %package apidocs
65 Summary:        API documentation for %{orgname}
66 Summary(pl.UTF-8):      Dokumentacja API %{orgname}
67 Group:          Documentation
68 Obsoletes:      kf5-extra-cmake-modules-doc < 1.4.0
69
70 %description apidocs
71 API documentation for %{orgname}.
72
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API dla %{orgname}.
75
76 %prep
77 %setup -q -n %{orgname}-%{version}
78 %patch0 -p1
79 %patch1 -p0
80
81 # causes make install failure after running tests
82 %{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
83
84 %build
85 install -d build
86 cd build
87 %cmake \
88         %{!?with_tests:-DBUILD_TESTING=OFF} \
89         %{!?with_doc:-DBUILD_HTML_DOCS=OFF} \
90         ..
91
92 %{__make}
93
94 %if %{with tests}
95 # GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
96 # ECMPoQmToolsTest fails to build it's own moc file
97 ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)' --output-on-failure
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %{__make} -C build -j1 install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/pre-commit.in
107 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/clang-format.sh
108
109 %if %{with doc}
110 %{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
111 %endif
112 install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories5
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %files
118 %defattr(644,root,root,755)
119 %doc COPYING-CMAKE-SCRIPTS README.rst
120 %{_datadir}/ECM
121 %{_datadir}/qlogging-categories5
122 %{_mandir}/man7/ecm*.7*
123
124 %if %{with doc}
125 %files apidocs
126 %defattr(644,root,root,755)
127 %doc ECM-doc/html/*
128 %endif
This page took 0.042335 seconds and 3 git commands to generate.