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