]>
Commit | Line | Data |
---|---|---|
d1b2e54c | 1 | # TODO: |
4211e02d | 2 | # - system kwiml? |
bdbf72c3 | 3 | # - make lib64/libx32 patch changes applicable everywhere |
d1b2e54c JB |
4 | # - any valid CMAKE_BUILD_TYPE causes overriding of our optflags |
5 | # (and default non-verbose makefiles are hiding it!) | |
6 | # - rpmldflags/rpmcppflags are not passed through %%cmake macro at all | |
7 | # (is there any standard way???) | |
02d8d7ee JR |
8 | # - FindJNI.cmake module is a PoS full of random incorrect paths, |
9 | # needs lib64/libx32 awareness | |
ccca321d KK |
10 | # |
11 | # Conditional build: | |
b563f9dc JB |
12 | %bcond_with bootstrap # use internal versions of some libraries |
13 | %bcond_without gui # don't build gui package | |
63b5fdd8 | 14 | %bcond_with tests # perform "make test" |
90b41c6c | 15 | %bcond_without doc # don't build documentation |
77f8acdd | 16 | |
efafbc62 | 17 | Summary: Cross-platform, open-source make system |
ac3ea35a | 18 | Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach |
72a696fa | 19 | Name: cmake |
70541a8c | 20 | Version: 3.22.2 |
15d3b66d | 21 | Release: 1 |
efafbc62 | 22 | License: BSD |
72a696fa | 23 | Group: Development/Building |
70541a8c JR |
24 | Source0: https://cmake.org/files/v3.22/%{name}-%{version}.tar.gz |
25 | # Source0-md5: f96b91224aa14b09565325b51d60af43 | |
6342daf8 | 26 | Patch0: %{name}-lib64.patch |
834c9659 | 27 | Patch1: %{name}-libx32.patch |
834c9659 JR |
28 | Patch3: %{name}-findruby.patch |
29 | Patch4: %{name}-findruby2.patch | |
22b75947 | 30 | URL: https://cmake.org/ |
17d1eb52 | 31 | # system zlib,bzip2,xz,zstd used only when without system libarchive |
22b75947 JB |
32 | %if %{with gui} |
33 | BuildRequires: Qt5Core-devel >= 5.0 | |
34 | BuildRequires: Qt5Gui-devel >= 5.0 | |
35 | BuildRequires: Qt5Widgets-devel >= 5.0 | |
36 | %endif | |
a48136e8 | 37 | BuildRequires: curl-devel |
a3907799 | 38 | BuildRequires: expat-devel |
466fdfa1 | 39 | BuildRequires: jsoncpp-devel >= 1.6.2-2 |
fef12180 | 40 | BuildRequires: libarchive-devel |
ece9e155 | 41 | BuildRequires: libstdc++-devel |
da1ef5d3 | 42 | BuildRequires: libuv-devel |
59917d1a | 43 | BuildRequires: ncurses-devel > 5.9-3 |
17d1eb52 | 44 | BuildRequires: ncurses-ext-devel > 5.9-3 |
22b75947 JB |
45 | %{?with_gui:BuildRequires: qt5-build >= 5.0} |
46 | %{?with_gui:BuildRequires: qt5-qmake >= 5.0} | |
4211e02d | 47 | BuildRequires: rhash-devel |
ece9e155 | 48 | BuildRequires: rpmbuild(macros) >= 1.167 |
90b41c6c | 49 | %{?with_doc:BuildRequires: sphinx-pdg} |
a48136e8 | 50 | BuildRequires: zlib-devel |
75cb386f | 51 | Requires: filesystem >= 3.0-52 |
efafbc62 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3fcbc09a AG |
53 | |
54 | %description | |
efafbc62 AG |
55 | CMake is used to control the software compilation process using simple |
56 | platform and compiler independent configuration files. CMake generates | |
57 | native makefiles and workspaces that can be used in the compiler | |
58 | environment of your choice. CMake is quite sophisticated: it is | |
59 | possible to support complex environments requiring system | |
60 | configuration, pre-processor generation, code generation, and template | |
61 | instantiation. | |
3fcbc09a | 62 | |
520c9eb8 JR |
63 | %description -l pl.UTF-8 |
64 | CMake służy do sterowania procesem kompilacji oprogramowania przy | |
ca760f29 | 65 | użyciu prostych plików konfiguracyjnych niezależnych od platformy i |
66 | kompilatora. CMake generuje natywne pliki makefile i workspace, | |
485d9a7a | 67 | których można używać w wybranym środowisku kompilatora. CMake jest |
59787775 | 68 | dość wyrafinowany: może obsłużyć złożone środowiska wymagające |
ca760f29 | 69 | konfiguracji systemu, generowanie preprocesora, generowanie kodu i |
70 | dziedziczenie szablonów. | |
33042d59 | 71 | |
fe46a853 JB |
72 | %package doc-html |
73 | Summary: CMake documentation in HTML format | |
74 | Summary(pl.UTF-8): Dokumentacja do pakietu CMake w formacie HTML | |
75 | Group: Documentation | |
76 | ||
77 | %description doc-html | |
78 | CMake documentation in HTML format. | |
79 | ||
80 | %description doc-html -l pl.UTF-8 | |
81 | Dokumentacja do pakietu CMake w formacie HTML. | |
82 | ||
33042d59 | 83 | %package gui |
b563f9dc JB |
84 | Summary: Qt GUI for CMake |
85 | Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake | |
33042d59 KK |
86 | Group: Development/Tools |
87 | Requires: %{name} = %{version}-%{release} | |
88 | ||
b563f9dc JB |
89 | %description gui |
90 | This package contains the Qt based GUI for CMake. | |
91 | ||
92 | %description gui -l pl.UTF-8 | |
93 | Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla | |
94 | CMake. | |
72a696fa | 95 | |
9ec4f08d | 96 | %package emacs |
69d19c08 JB |
97 | Summary: Emacs mode for cmake files |
98 | Summary(pl.UTF-8): Tryb Emacsa dla plików cmake'a | |
9ec4f08d KK |
99 | Group: Development/Tools |
100 | ||
101 | %description emacs | |
69d19c08 JB |
102 | Emacs mode for cmake files. |
103 | ||
104 | %description emacs -l pl.UTF-8 | |
105 | Tryb Emacsa dla plików cmake'a. | |
9ec4f08d KK |
106 | |
107 | %package -n bash-completion-%{name} | |
108 | Summary: bash-completion for cmake | |
69d19c08 | 109 | Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla cmake'a |
9ec4f08d | 110 | Group: Applications/Shells |
69d19c08 | 111 | Requires: %{name} = %{version}-%{release} |
a9b1845f | 112 | Requires: bash-completion >= 2.0 |
6465d90a | 113 | BuildArch: noarch |
9ec4f08d KK |
114 | |
115 | %description -n bash-completion-%{name} | |
69d19c08 JB |
116 | bash-completion for cmake. |
117 | ||
118 | %description -n bash-completion-%{name} -l pl.UTF-8 | |
119 | Bashowe dopełnianie parametrów dla cmake'a. | |
9ec4f08d | 120 | |
3fcbc09a | 121 | %prep |
923851a2 | 122 | %setup -q |
286b1479 | 123 | %if "%{_lib}" == "lib64" |
6342daf8 | 124 | %patch0 -p1 |
286b1479 | 125 | %endif |
834c9659 | 126 | %if "%{_lib}" == "libx32" |
9ec4f08d | 127 | %patch1 -p1 |
834c9659 | 128 | %endif |
04706b61 | 129 | %patch3 -p1 |
834c9659 | 130 | %patch4 -p1 |
3fcbc09a | 131 | |
4b266473 JR |
132 | %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \ |
133 | Modules/Compiler/XL-Fortran/cpp | |
134 | ||
ece9e155 | 135 | cat > "init.cmake" <<EOF |
286b1479 | 136 | SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE) |
9ec4f08d KK |
137 | SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE) |
138 | SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE) | |
ece9e155 KK |
139 | EOF |
140 | ||
b343cdb1 JR |
141 | # cleanup backups after patching, modules are copied as-is |
142 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
143 | ||
3fcbc09a | 144 | %build |
ece9e155 KK |
145 | export CC="%{__cc}" |
146 | export CXX="%{__cxx}" | |
147 | export CFLAGS="%{rpmcflags}" | |
148 | export CXXFLAGS="%{rpmcxxflags}" | |
ccca321d | 149 | export LDFLAGS="%{rpmldflags}" |
923851a2 AG |
150 | ./bootstrap \ |
151 | --prefix=%{_prefix} \ | |
152 | --mandir=/share/man \ | |
153 | --datadir=/share/cmake \ | |
ece9e155 | 154 | --init=init.cmake \ |
c342f103 | 155 | %{!?with_bootstrap:--system-libs} \ |
33042d59 | 156 | %{?with_gui:--qt-gui} \ |
22b75947 | 157 | --qt-qmake=%{_bindir}/qmake-qt5 \ |
90b41c6c JR |
158 | %{?with_doc:--sphinx-html} \ |
159 | %{?with_doc:--sphinx-man} \ | |
a48136e8 | 160 | --verbose |
923851a2 | 161 | |
a48136e8 JB |
162 | %{__make} \ |
163 | VERBOSE=1 | |
3fcbc09a | 164 | |
1fbe3ed6 AM |
165 | %{?with_tests:%{__make} test} |
166 | ||
3fcbc09a | 167 | %install |
efafbc62 | 168 | rm -rf $RPM_BUILD_ROOT |
72a696fa JB |
169 | %{__make} install \ |
170 | DESTDIR=$RPM_BUILD_ROOT | |
171 | ||
75cb386f | 172 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc |
3fcbc09a AG |
173 | |
174 | %clean | |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | ||
177 | %files | |
efafbc62 | 178 | %defattr(644,root,root,755) |
fe46a853 | 179 | %doc Copyright.txt README.rst *.gif |
72a696fa JB |
180 | %attr(755,root,root) %{_bindir}/ccmake |
181 | %attr(755,root,root) %{_bindir}/cmake | |
08b6790a | 182 | %attr(755,root,root) %{_bindir}/cpack |
72a696fa | 183 | %attr(755,root,root) %{_bindir}/ctest |
90b41c6c | 184 | %if %{with doc} |
08bb5e07 JB |
185 | %{_mandir}/man1/ccmake.1* |
186 | %{_mandir}/man1/cmake.1* | |
08bb5e07 JB |
187 | %{_mandir}/man1/cpack.1* |
188 | %{_mandir}/man1/ctest.1* | |
a8099d1a | 189 | %{_mandir}/man7/cpack-generators.7* |
fe46a853 JB |
190 | %{_mandir}/man7/cmake-buildsystem.7* |
191 | %{_mandir}/man7/cmake-commands.7* | |
cda7a827 | 192 | %{_mandir}/man7/cmake-compile-features.7* |
fe46a853 | 193 | %{_mandir}/man7/cmake-developer.7* |
bac58766 | 194 | %{_mandir}/man7/cmake-env-variables.7* |
b094c172 | 195 | %{_mandir}/man7/cmake-file-api.7* |
fe46a853 JB |
196 | %{_mandir}/man7/cmake-generator-expressions.7* |
197 | %{_mandir}/man7/cmake-generators.7* | |
198 | %{_mandir}/man7/cmake-language.7* | |
199 | %{_mandir}/man7/cmake-modules.7* | |
200 | %{_mandir}/man7/cmake-packages.7* | |
201 | %{_mandir}/man7/cmake-policies.7* | |
4b266473 | 202 | %{_mandir}/man7/cmake-presets.7* |
fe46a853 JB |
203 | %{_mandir}/man7/cmake-properties.7* |
204 | %{_mandir}/man7/cmake-qt.7* | |
da1ef5d3 | 205 | %{_mandir}/man7/cmake-server.7* |
fe46a853 JB |
206 | %{_mandir}/man7/cmake-toolchains.7* |
207 | %{_mandir}/man7/cmake-variables.7* | |
0278e558 | 208 | %{_datadir}/cmake/Help |
90b41c6c | 209 | %endif |
b24a2e64 JB |
210 | # top cmake/Modules dirs belong to filesystem |
211 | %{_datadir}/cmake/Modules/.NoDartCoverage | |
212 | %{_datadir}/cmake/Modules/* | |
213 | %{_datadir}/cmake/Templates | |
4b266473 | 214 | #%{_datadir}/cmake/editors |
b24a2e64 | 215 | %{_datadir}/cmake/include |
09f5d631 | 216 | %{_aclocaldir}/cmake.m4 |
33042d59 | 217 | |
90b41c6c | 218 | %if %{with doc} |
fe46a853 JB |
219 | %files doc-html |
220 | %defattr(644,root,root,755) | |
221 | %doc Utilities/Sphinx/html/* | |
90b41c6c | 222 | %endif |
fe46a853 | 223 | |
1a3a9dcd | 224 | %if %{with gui} |
33042d59 KK |
225 | %files gui |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_bindir}/cmake-gui | |
228 | %{_datadir}/mime/packages/cmakecache.xml | |
af122c88 | 229 | %{_desktopdir}/cmake-gui.desktop |
466fdfa1 AM |
230 | %{_iconsdir}/hicolor/128x128/apps/CMakeSetup.png |
231 | %{_iconsdir}/hicolor/32x32/apps/CMakeSetup.png | |
49e2a1c9 | 232 | %if %{with doc} |
08bb5e07 | 233 | %{_mandir}/man1/cmake-gui.1* |
1a3a9dcd | 234 | %endif |
49e2a1c9 | 235 | %endif |
9ec4f08d KK |
236 | |
237 | %files emacs | |
238 | %defattr(644,root,root,755) | |
239 | %{_datadir}/emacs/site-lisp/cmake-mode.el | |
240 | ||
241 | %files -n bash-completion-%{name} | |
242 | %defattr(644,root,root,755) | |
466fdfa1 AM |
243 | %{bash_compdir}/cmake |
244 | %{bash_compdir}/cpack | |
245 | %{bash_compdir}/ctest |