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