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