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