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