]> git.pld-linux.org Git - packages/kf5-extra-cmake-modules.git/blob - kf5-extra-cmake-modules.spec
- updated to 5.92.0
[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.92
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.92.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:  695df08819b4dd0a884793c5256b1b18
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:  Qt5Gui-devel >= 5.9.0
31 BuildRequires:  Qt5Network-devel >= 5.9.0
32 BuildRequires:  Qt5Qml-devel >= 5.9.0
33 BuildRequires:  Qt5Quick-devel >= 5.9.0
34 BuildRequires:  libstdc++-devel >= 6:5
35 BuildRequires:  qt5-build >= 5.9.0
36 %endif
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
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
44 perform common tasks.
45
46 In addition, it provides common build settings used in software
47 produced by the KDE community.
48
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.
52
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
58 wspólnych zadań.
59
60 Ponadto pakiet dostarcza wspólne ustawienia budowana używane w
61 oprogramowaniu tworzonym przez społeczność KDE.
62
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.
66
67 %package apidocs
68 Summary:        API documentation for %{orgname}
69 Summary(pl.UTF-8):      Dokumentacja API %{orgname}
70 Group:          Documentation
71 Obsoletes:      kf5-extra-cmake-modules-doc < 1.4.0
72
73 %description apidocs
74 API documentation for %{orgname}.
75
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API dla %{orgname}.
78
79 %prep
80 %setup -q -n %{orgname}-%{version}
81 %patch0 -p1
82 %patch1 -p0
83
84 # causes make install failure after running tests
85 %{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
86
87 %build
88 install -d build
89 cd build
90 %cmake \
91         %{!?with_tests:-DBUILD_TESTING=OFF} \
92         %{!?with_doc:-DBUILD_HTML_DOCS=OFF} \
93         ..
94
95 %{__make}
96
97 %if %{with tests}
98 # GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
99 # ECMPoQmToolsTest fails to build it's own moc file
100 ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)'
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %{__make} -C build -j1 install \
107         DESTDIR=$RPM_BUILD_ROOT
108
109 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/pre-commit.in
110 sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/clang-format.sh
111
112 %if %{with doc}
113 %{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
114 %endif
115 install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories5
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %doc COPYING-CMAKE-SCRIPTS README.rst
123 %{_datadir}/ECM
124 %{_datadir}/qlogging-categories5
125 %{_mandir}/man7/ecm*.7*
126
127 %if %{with doc}
128 %files apidocs
129 %defattr(644,root,root,755)
130 %doc ECM-doc/html/*
131 %endif
This page took 0.118773 seconds and 3 git commands to generate.