1 | # Do we add appdata-files?
|
---|
2 | # consider conditional on whether %%_metainfodir is defined or not instead -- rex
|
---|
3 | %if 0%{?fedora} || 0%{?rhel} > 7
|
---|
4 | %bcond_without appdata
|
---|
5 | %else
|
---|
6 | %bcond_with appdata
|
---|
7 | %endif
|
---|
8 |
|
---|
9 | # Set to bcond_without or use --with bootstrap if bootstrapping a new release
|
---|
10 | # or architecture
|
---|
11 | %if !0%{?os2_version}
|
---|
12 | %bcond_with bootstrap
|
---|
13 | %else
|
---|
14 | %bcond_without bootstrap
|
---|
15 | %endif
|
---|
16 |
|
---|
17 | # Build with Emacs support
|
---|
18 | %if !0%{?os2_version}
|
---|
19 | %bcond_without emacs
|
---|
20 | %else
|
---|
21 | %bcond_with emacs
|
---|
22 | %global _emacs_sitelispdir %{_prefix}/share/emacs
|
---|
23 | %endif
|
---|
24 |
|
---|
25 | # Run git tests
|
---|
26 | %if !0%{?os2_version}
|
---|
27 | %bcond_without git_test
|
---|
28 | %else
|
---|
29 | %bcond_with git_test
|
---|
30 | %endif
|
---|
31 |
|
---|
32 | # Set to bcond_with or use --without gui to disable qt4 gui build
|
---|
33 | %bcond_without gui
|
---|
34 |
|
---|
35 | # Use ncurses for colorful output
|
---|
36 | %bcond_without ncurses
|
---|
37 |
|
---|
38 | # Setting the Python-version used by default
|
---|
39 | %if 0%{?rhel} && 0%{?rhel} < 8
|
---|
40 | %bcond_with python3
|
---|
41 | %else
|
---|
42 | %bcond_without python3
|
---|
43 | %endif
|
---|
44 |
|
---|
45 | # Enable RPM dependency generators for cmake files written in Python
|
---|
46 | %bcond_without rpm
|
---|
47 |
|
---|
48 | %if !0%{?os2_version}
|
---|
49 | %bcond_without sphinx
|
---|
50 | %else
|
---|
51 | %bcond_with sphinx
|
---|
52 | %endif
|
---|
53 |
|
---|
54 | %if 0%{?os2_version}
|
---|
55 | %bcond_with bundled_jsoncpp
|
---|
56 | %bcond_without bundled_rhash
|
---|
57 | %else
|
---|
58 | %if !0%{?rhel}
|
---|
59 | %bcond_with bundled_jsoncpp
|
---|
60 | %bcond_with bundled_rhash
|
---|
61 | %else
|
---|
62 | %bcond_without bundled_jsoncpp
|
---|
63 | %bcond_without bundled_rhash
|
---|
64 | %endif
|
---|
65 | %endif
|
---|
66 |
|
---|
67 | # Run tests
|
---|
68 | %if !0%{?os2_version}
|
---|
69 | %bcond_without test
|
---|
70 | %else
|
---|
71 | %bcond_with test
|
---|
72 | %endif
|
---|
73 |
|
---|
74 | # Enable X11 tests
|
---|
75 | %if !0%{?os2_version}
|
---|
76 | %bcond_without X11_test
|
---|
77 | %else
|
---|
78 | %bcond_with X11_test
|
---|
79 | %endif
|
---|
80 |
|
---|
81 | # Do not build non-lto objects to reduce build time significantly.
|
---|
82 | %global optflags %(echo '%{optflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g')
|
---|
83 |
|
---|
84 | # Place rpm-macros into proper location
|
---|
85 | %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
---|
86 |
|
---|
87 | # Setup _pkgdocdir if not defined already
|
---|
88 | %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
---|
89 |
|
---|
90 | # Setup _vpath_builddir if not defined already
|
---|
91 | %{!?_vpath_builddir:%global _vpath_builddir %(echo '%{_target_platform}' | sed -e 's!/!!g')}
|
---|
92 |
|
---|
93 | %global major_version 3
|
---|
94 | %global minor_version 20
|
---|
95 | # Set to RC version if building RC, else %%{nil}
|
---|
96 | #global rcsuf rc1
|
---|
97 | %{?rcsuf:%global relsuf .%{rcsuf}}
|
---|
98 | %{?rcsuf:%global versuf -%{rcsuf}}
|
---|
99 |
|
---|
100 | # For handling bump release by rpmdev-bumpspec and mass rebuild
|
---|
101 | %global baserelease 1
|
---|
102 |
|
---|
103 | # Uncomment if building for EPEL
|
---|
104 | #global name_suffix %%{major_version}
|
---|
105 | %global orig_name cmake
|
---|
106 |
|
---|
107 | Name: %{orig_name}%{?name_suffix}
|
---|
108 | Version: %{major_version}.%{minor_version}.6
|
---|
109 | Release: 2%{?dist}
|
---|
110 | Summary: Cross-platform make system
|
---|
111 |
|
---|
112 | # most sources are BSD
|
---|
113 | # Source/CursesDialog/form/ a bunch is MIT
|
---|
114 | # Source/kwsys/MD5.c is zlib
|
---|
115 | # some GPL-licensed bison-generated files, which all include an
|
---|
116 | # exception granting redistribution under terms of your choice
|
---|
117 | License: BSD and MIT and zlib
|
---|
118 | URL: http://www.cmake.org
|
---|
119 | %if !0%{?os2_version}
|
---|
120 | Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?versuf}.tar.gz
|
---|
121 | Source1: %{name}-init.el
|
---|
122 | %else
|
---|
123 | Vendor: bww bitwise works GmbH
|
---|
124 | %scm_source github http://github.com/bitwiseworks/cmake-os2 %{version}-os2
|
---|
125 | %endif
|
---|
126 | Source2: macros.%{name}
|
---|
127 | # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899
|
---|
128 | Source3: %{name}.attr
|
---|
129 | Source4: %{name}.prov
|
---|
130 | Source5: %{name}.req
|
---|
131 |
|
---|
132 | %if !0%{?os2_version}
|
---|
133 | # Always start regular patches with numbers >= 100.
|
---|
134 | # We need lower numbers for patches in compat package.
|
---|
135 | # And this enables us to use %%autosetup
|
---|
136 | #
|
---|
137 | # Patch to fix RindRuby vendor settings
|
---|
138 | # http://public.kitware.com/Bug/view.php?id=12965
|
---|
139 | # https://bugzilla.redhat.com/show_bug.cgi?id=822796
|
---|
140 | Patch100: %{name}-findruby.patch
|
---|
141 | # Add dl to CMAKE_DL_LIBS on MINGW
|
---|
142 | # https://gitlab.kitware.com/cmake/cmake/issues/17600
|
---|
143 | %if 0%{?fedora} && 0%{?fedora} < 38
|
---|
144 | Patch102: %{name}-mingw-dl.patch
|
---|
145 | %endif
|
---|
146 |
|
---|
147 | # Patch for renaming on EPEL
|
---|
148 | %if 0%{?name_suffix:1}
|
---|
149 | Patch1: %{name}-rename.patch
|
---|
150 | %endif
|
---|
151 | %endif
|
---|
152 |
|
---|
153 | BuildRequires: coreutils
|
---|
154 | BuildRequires: findutils
|
---|
155 | BuildRequires: gcc-c++
|
---|
156 | %if !0%{?os2_version}
|
---|
157 | BuildRequires: gcc-gfortran
|
---|
158 | %endif
|
---|
159 | BuildRequires: sed
|
---|
160 | %if !0%{?os2_version}
|
---|
161 | %if %{with git_test}
|
---|
162 | # Tests fail if only git-core is installed, bug #1488830
|
---|
163 | BuildRequires: git
|
---|
164 | %else
|
---|
165 | BuildConflicts: git-core
|
---|
166 | %endif
|
---|
167 | %endif
|
---|
168 | %if %{with X11_test}
|
---|
169 | BuildRequires: libX11-devel
|
---|
170 | %endif
|
---|
171 | %if %{with ncurses}
|
---|
172 | BuildRequires: ncurses-devel
|
---|
173 | %endif
|
---|
174 | %if %{with sphinx}
|
---|
175 | BuildRequires: %{_bindir}/sphinx-build
|
---|
176 | %endif
|
---|
177 | %if %{without bootstrap} || 0%{?os2_version}
|
---|
178 | BuildRequires: bzip2-devel
|
---|
179 | BuildRequires: curl-devel
|
---|
180 | BuildRequires: expat-devel
|
---|
181 | %if %{with bundled_jsoncpp}
|
---|
182 | Provides: bundled(jsoncpp)
|
---|
183 | %else
|
---|
184 | BuildRequires: jsoncpp-devel
|
---|
185 | %endif
|
---|
186 | %if !0%{?os2_version}
|
---|
187 | %if 0%{?fedora} || 0%{?rhel} >= 7
|
---|
188 | BuildRequires: libarchive-devel
|
---|
189 | %else
|
---|
190 | BuildRequires: libarchive3-devel
|
---|
191 | %endif
|
---|
192 | %endif
|
---|
193 | BuildRequires: libuv-devel
|
---|
194 | %if %{with bundled_rhash}
|
---|
195 | Provides: bundled(rhash)
|
---|
196 | %else
|
---|
197 | BuildRequires: rhash-devel
|
---|
198 | %endif
|
---|
199 | BuildRequires: xz-devel
|
---|
200 | BuildRequires: zlib-devel
|
---|
201 | %if !0%{?os2_version}
|
---|
202 | BuildRequires: vim-filesystem
|
---|
203 | %endif
|
---|
204 | %endif
|
---|
205 | %if %{with emacs}
|
---|
206 | BuildRequires: emacs
|
---|
207 | %endif
|
---|
208 | BuildRequires: openssl-devel
|
---|
209 | %if %{with rpm}
|
---|
210 | %if %{with python3}
|
---|
211 | %{!?python3_pkgversion: %global python3_pkgversion 3}
|
---|
212 | BuildRequires: python%{python3_pkgversion}-devel
|
---|
213 | %else
|
---|
214 | BuildRequires: python2-devel
|
---|
215 | %endif
|
---|
216 | %endif
|
---|
217 | %if %{with gui}
|
---|
218 | %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?os2_version}
|
---|
219 | BuildRequires: pkgconfig(Qt5Widgets)
|
---|
220 | %else
|
---|
221 | BuildRequires: pkgconfig(QtGui)
|
---|
222 | %endif
|
---|
223 | %if !0%{?os2_version}
|
---|
224 | BuildRequires: desktop-file-utils
|
---|
225 | %endif
|
---|
226 | %endif
|
---|
227 |
|
---|
228 | %if !0%{?os2_version}
|
---|
229 | BuildRequires: pkgconfig(bash-completion)
|
---|
230 | %global bash_completionsdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo '%{_datadir}/bash-completion/completions')
|
---|
231 | %endif
|
---|
232 |
|
---|
233 | %if %{without bootstrap}
|
---|
234 | # Ensure we have our own rpm-macros in place during build.
|
---|
235 | BuildRequires: %{name}-rpm-macros
|
---|
236 | %endif
|
---|
237 | BuildRequires: make
|
---|
238 |
|
---|
239 | Requires: %{name}-data = %{version}-%{release}
|
---|
240 | Requires: %{name}-rpm-macros = %{version}-%{release}
|
---|
241 | %if !0%{?os2_version}
|
---|
242 | Requires: %{name}-filesystem%{?_isa} = %{version}-%{release}
|
---|
243 | %else
|
---|
244 | Requires: %{name}-filesystem = %{version}-%{release}
|
---|
245 | %endif
|
---|
246 |
|
---|
247 | # Explicitly require make. (rhbz#1862014)
|
---|
248 | Requires: make
|
---|
249 |
|
---|
250 | # Provide the major version name
|
---|
251 | Provides: %{orig_name}%{major_version} = %{version}-%{release}
|
---|
252 |
|
---|
253 | # Source/kwsys/MD5.c
|
---|
254 | # see https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
|
---|
255 | Provides: bundled(md5-deutsch)
|
---|
256 |
|
---|
257 | # https://fedorahosted.org/fpc/ticket/555
|
---|
258 | Provides: bundled(kwsys)
|
---|
259 |
|
---|
260 | %description
|
---|
261 | CMake is used to control the software compilation process using simple
|
---|
262 | platform and compiler independent configuration files. CMake generates
|
---|
263 | native makefiles and workspaces that can be used in the compiler
|
---|
264 | environment of your choice. CMake is quite sophisticated: it is possible
|
---|
265 | to support complex environments requiring system configuration, preprocessor
|
---|
266 | generation, code generation, and template instantiation.
|
---|
267 |
|
---|
268 |
|
---|
269 | %package data
|
---|
270 | Summary: Common data-files for %{name}
|
---|
271 | Requires: %{name} = %{version}-%{release}
|
---|
272 | Requires: %{name}-filesystem = %{version}-%{release}
|
---|
273 | Requires: %{name}-rpm-macros = %{version}-%{release}
|
---|
274 | %if %{with emacs}
|
---|
275 | %if 0%{?fedora} || 0%{?rhel} >= 7
|
---|
276 | Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
|
---|
277 | %endif
|
---|
278 | %endif
|
---|
279 | %if !0%{?os2_version}
|
---|
280 | Requires: vim-filesystem
|
---|
281 | %endif
|
---|
282 |
|
---|
283 | BuildArch: noarch
|
---|
284 |
|
---|
285 | %description data
|
---|
286 | This package contains common data-files for %{name}.
|
---|
287 |
|
---|
288 |
|
---|
289 | %package doc
|
---|
290 | Summary: Documentation for %{name}
|
---|
291 | BuildArch: noarch
|
---|
292 |
|
---|
293 | %description doc
|
---|
294 | This package contains documentation for %{name}.
|
---|
295 |
|
---|
296 |
|
---|
297 | %package filesystem
|
---|
298 | Summary: Directories used by CMake modules
|
---|
299 |
|
---|
300 | %description filesystem
|
---|
301 | This package owns all directories used by CMake modules.
|
---|
302 |
|
---|
303 |
|
---|
304 | %if %{with gui}
|
---|
305 | %package gui
|
---|
306 | Summary: Qt GUI for %{name}
|
---|
307 |
|
---|
308 | %if !0%{?os2_version}
|
---|
309 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
---|
310 | Requires: hicolor-icon-theme
|
---|
311 | Requires: shared-mime-info%{?_isa}
|
---|
312 | %else
|
---|
313 | Requires: %{name} = %{version}-%{release}
|
---|
314 | %endif
|
---|
315 |
|
---|
316 | %description gui
|
---|
317 | The %{name}-gui package contains the Qt based GUI for %{name}.
|
---|
318 | %endif
|
---|
319 |
|
---|
320 |
|
---|
321 | %package rpm-macros
|
---|
322 | Summary: Common RPM macros for %{name}
|
---|
323 | Requires: rpm
|
---|
324 | # when subpkg introduced
|
---|
325 | Conflicts: cmake-data < 3.10.1-2
|
---|
326 |
|
---|
327 | BuildArch: noarch
|
---|
328 |
|
---|
329 | %description rpm-macros
|
---|
330 | This package contains common RPM macros for %{name}.
|
---|
331 |
|
---|
332 |
|
---|
333 | %if 0%{?os2_version}
|
---|
334 | %debug_package
|
---|
335 | %endif
|
---|
336 |
|
---|
337 | %prep
|
---|
338 | %if !0%{?os2_version}
|
---|
339 | %autosetup -n %{orig_name}-%{version}%{?versuf} -p 1
|
---|
340 | %else
|
---|
341 | %scm_setup
|
---|
342 | %endif
|
---|
343 |
|
---|
344 | %if %{with rpm}
|
---|
345 | %if %{with python3}
|
---|
346 | echo '#!%{__python3}' > %{name}.prov
|
---|
347 | echo '#!%{__python3}' > %{name}.req
|
---|
348 | %else
|
---|
349 | echo '#!%{__python2}' > %{name}.prov
|
---|
350 | echo '#!%{__python2}' > %{name}.req
|
---|
351 | %endif
|
---|
352 | tail -n +2 %{SOURCE4} >> %{name}.prov
|
---|
353 | tail -n +2 %{SOURCE5} >> %{name}.req
|
---|
354 | %endif
|
---|
355 |
|
---|
356 |
|
---|
357 | %build
|
---|
358 | %if 0%{?set_build_flags:1}
|
---|
359 | %{set_build_flags}
|
---|
360 | %else
|
---|
361 | CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
|
---|
362 | CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
|
---|
363 | FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS
|
---|
364 | FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS
|
---|
365 | %if !0%{?os2_version}
|
---|
366 | %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
---|
367 | %else
|
---|
368 | export LDFLAGS="-Zomf -Zhigh-mem -lcx %{?__global_ldflags}"
|
---|
369 | export VENDOR="%{vendor}"
|
---|
370 | %endif
|
---|
371 | %endif
|
---|
372 | %if !0%{?os2_version}
|
---|
373 | SRCDIR="$(/usr/bin/pwd)"
|
---|
374 | mkdir %{_vpath_builddir}
|
---|
375 | pushd %{_vpath_builddir}
|
---|
376 | %else
|
---|
377 | SRCDIR="$(/@unixroot/usr/bin/pwd)"
|
---|
378 | mkdir %{_vpath_builddir}
|
---|
379 | cd %{_vpath_builddir}
|
---|
380 | %endif
|
---|
381 | $SRCDIR/bootstrap --prefix=%{_prefix} \
|
---|
382 | --datadir=/share/%{name} \
|
---|
383 | --docdir=/share/doc/%{name} \
|
---|
384 | --mandir=/share/man \
|
---|
385 | %if !0%{?os2_version}
|
---|
386 | --%{?with_bootstrap:no-}system-libs \
|
---|
387 | %else
|
---|
388 | --bootstrap-system-libuv \
|
---|
389 | --system-libs \
|
---|
390 | --no-system-libarchive \
|
---|
391 | --no-system-nghttp2 \
|
---|
392 | --no-system-zstd \
|
---|
393 | %endif
|
---|
394 | --parallel="$(echo %{?_smp_mflags} | sed -e 's|-j||g')" \
|
---|
395 | %if %{with bundled_rhash}
|
---|
396 | --no-system-librhash \
|
---|
397 | %endif
|
---|
398 | %if %{with bundled_jsoncpp}
|
---|
399 | --no-system-jsoncpp \
|
---|
400 | %endif
|
---|
401 | %if %{with sphinx}
|
---|
402 | --sphinx-man --sphinx-html \
|
---|
403 | %else
|
---|
404 | --sphinx-build=%{_bindir}/false \
|
---|
405 | %endif
|
---|
406 | --%{!?with_gui:no-}qt-gui \
|
---|
407 | -- \
|
---|
408 | -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \
|
---|
409 | -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \
|
---|
410 | -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-O2 -g -DNDEBUG" \
|
---|
411 | -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
---|
412 | -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF
|
---|
413 | %if !0%{?os2_version}
|
---|
414 | popd
|
---|
415 | %make_build -C %{_vpath_builddir}
|
---|
416 | %else
|
---|
417 | cd ..
|
---|
418 | make -C %{_vpath_builddir}
|
---|
419 | %endif
|
---|
420 |
|
---|
421 |
|
---|
422 | %install
|
---|
423 | mkdir -p %{buildroot}%{_pkgdocdir}
|
---|
424 | %make_install -C %{_vpath_builddir} CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir}
|
---|
425 | find %{buildroot}%{_datadir}/%{name}/Modules -type f | xargs chmod -x
|
---|
426 | [ -n "$(find %{buildroot}%{_datadir}/%{name}/Modules -name \*.orig)" ] &&
|
---|
427 | echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" &&
|
---|
428 | exit 1
|
---|
429 | # Install major_version name links
|
---|
430 | %if !0%{?os2_version}
|
---|
431 | %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done}
|
---|
432 | %else
|
---|
433 | %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s ${f}.exe %{buildroot}%{_bindir}/${f}%{major_version}; done}
|
---|
434 | %endif
|
---|
435 |
|
---|
436 | %if 0%{?os2_version}
|
---|
437 | rm -rf %{buildroot}%{_prefix}/share/vim
|
---|
438 | rm -rf %{buildroot}%{_prefix}/share/bash-completion
|
---|
439 | %endif
|
---|
440 | %if %{with emacs}
|
---|
441 | # Install emacs cmake mode
|
---|
442 | mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} %{buildroot}%{_emacs_sitestartdir}
|
---|
443 | mv %{buildroot}%{_emacs_sitelispdir}/%{name}-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}
|
---|
444 | %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el
|
---|
445 | install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir}
|
---|
446 | %else
|
---|
447 | rm -rf %{buildroot}%{_emacs_sitelispdir}
|
---|
448 | %endif
|
---|
449 | # RPM macros
|
---|
450 | install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
---|
451 | sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
---|
452 | touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
---|
453 | %if %{with rpm} && 0%{?_rpmconfigdir:1}
|
---|
454 | # RPM auto provides
|
---|
455 | install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr
|
---|
456 | install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov
|
---|
457 | install -p -m0755 -D %{name}.req %{buildroot}%{_prefix}/lib/rpm/%{name}.req
|
---|
458 | %endif
|
---|
459 | mkdir -p %{buildroot}%{_libdir}/%{orig_name}
|
---|
460 | # Install copyright files for main package
|
---|
461 | find Source Utilities -type f -iname copy\* | while read f
|
---|
462 | do
|
---|
463 | fname=$(basename $f)
|
---|
464 | dir=$(dirname $f)
|
---|
465 | dname=$(basename $dir)
|
---|
466 | cp -p $f ./${fname}_${dname}
|
---|
467 | done
|
---|
468 | # Cleanup pre-installed documentation
|
---|
469 | %if %{with sphinx}
|
---|
470 | mv %{buildroot}%{_docdir}/%{name}/html .
|
---|
471 | %endif
|
---|
472 | rm -rf %{buildroot}%{_docdir}/%{name}
|
---|
473 | # Install documentation to _pkgdocdir
|
---|
474 | mkdir -p %{buildroot}%{_pkgdocdir}
|
---|
475 | cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
|
---|
476 | mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
|
---|
477 | %if %{with sphinx}
|
---|
478 | mv html %{buildroot}%{_pkgdocdir}
|
---|
479 | %endif
|
---|
480 |
|
---|
481 | %if %{with gui}
|
---|
482 | # Desktop file
|
---|
483 | %if !0%{?os2_version}
|
---|
484 | desktop-file-install --delete-original \
|
---|
485 | --dir=%{buildroot}%{_datadir}/applications \
|
---|
486 | %{buildroot}%{_datadir}/applications/%{name}-gui.desktop
|
---|
487 | %endif
|
---|
488 |
|
---|
489 | %if %{with appdata}
|
---|
490 | # Register as an application to be visible in the software center
|
---|
491 | #
|
---|
492 | # NOTE: It would be *awesome* if this file was maintained by the upstream
|
---|
493 | # project, translated and installed into the right place during `make install`.
|
---|
494 | #
|
---|
495 | # See http://www.freedesktop.org/software/appstream/docs/ for more details.
|
---|
496 | #
|
---|
497 | mkdir -p %{buildroot}%{_metainfodir}
|
---|
498 | cat > %{buildroot}%{_metainfodir}/cmake-gui.appdata.xml <<EOF
|
---|
499 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
500 | <!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
|
---|
501 | <!--
|
---|
502 | EmailAddress: kitware@kitware.com
|
---|
503 | SentUpstream: 2014-09-17
|
---|
504 | -->
|
---|
505 | <application>
|
---|
506 | <id type="desktop">cmake-gui.desktop</id>
|
---|
507 | <metadata_license>CC0-1.0</metadata_license>
|
---|
508 | <name>CMake GUI</name>
|
---|
509 | <summary>Create new CMake projects</summary>
|
---|
510 | <description>
|
---|
511 | <p>
|
---|
512 | CMake is an open source, cross platform build system that can build, test,
|
---|
513 | and package software. CMake GUI is a graphical user interface that can
|
---|
514 | create and edit CMake projects.
|
---|
515 | </p>
|
---|
516 | </description>
|
---|
517 | <url type="homepage">http://www.cmake.org</url>
|
---|
518 | <screenshots>
|
---|
519 | <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot>
|
---|
520 | </screenshots>
|
---|
521 | <!-- FIXME: change this to an upstream email address for spec updates
|
---|
522 | <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
|
---|
523 | -->
|
---|
524 | </application>
|
---|
525 | EOF
|
---|
526 | %endif
|
---|
527 | %endif
|
---|
528 |
|
---|
529 | # create manifests for splitting files and directories for filesystem-package
|
---|
530 | find %{buildroot}%{_datadir}/%{name} -type d | \
|
---|
531 | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf
|
---|
532 | find %{buildroot}%{_datadir}/%{name} -type f | \
|
---|
533 | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf
|
---|
534 | find %{buildroot}%{_libdir}/%{orig_name} -type d | \
|
---|
535 | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > lib_dirs.mf
|
---|
536 | find %{buildroot}%{_libdir}/%{orig_name} -type f | \
|
---|
537 | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > lib_files.mf
|
---|
538 | %if !0%{?os2_version}
|
---|
539 | find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
|
---|
540 | sed -e '/.*-gui$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf
|
---|
541 | %else
|
---|
542 | find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
|
---|
543 | sed -e '/.*-gui.exe$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf
|
---|
544 | %endif
|
---|
545 |
|
---|
546 | %if %{with test}
|
---|
547 | %check
|
---|
548 | %if !0%{?os2_version}
|
---|
549 | pushd %{_vpath_builddir}
|
---|
550 | %else
|
---|
551 | cd %{_vpath_builddir}
|
---|
552 | %endif
|
---|
553 | # CTestTestUpload requires internet access.
|
---|
554 | NO_TEST="CTestTestUpload"
|
---|
555 | # Likely failing for hardening flags from system.
|
---|
556 | NO_TEST="$NO_TEST|CustomCommand|RunCMake.PositionIndependentCode"
|
---|
557 | # curl test may fail during bootstrap
|
---|
558 | %if %{with bootstrap}
|
---|
559 | NO_TEST="$NO_TEST|curl"
|
---|
560 | %endif
|
---|
561 | bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure
|
---|
562 | ## do this only periodically, not for every build -- besser82 20221102
|
---|
563 | # Keep an eye on failing tests
|
---|
564 | #bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || :
|
---|
565 | %if !0%{?os2_version}
|
---|
566 | popd
|
---|
567 | %else
|
---|
568 | cd ..
|
---|
569 | %endif
|
---|
570 | %endif
|
---|
571 |
|
---|
572 |
|
---|
573 | %files -f lib_files.mf
|
---|
574 | %doc %dir %{_pkgdocdir}
|
---|
575 | %license Copyright.txt*
|
---|
576 | %license COPYING*
|
---|
577 | %if %{with sphinx}
|
---|
578 | %{_mandir}/man1/c%{name}.1.*
|
---|
579 | %{_mandir}/man1/%{name}.1.*
|
---|
580 | %{_mandir}/man1/cpack%{?name_suffix}.1.*
|
---|
581 | %{_mandir}/man1/ctest%{?name_suffix}.1.*
|
---|
582 | %{_mandir}/man7/*.7.*
|
---|
583 | %endif
|
---|
584 |
|
---|
585 |
|
---|
586 | %files data -f data_files.mf
|
---|
587 | %{_datadir}/aclocal/%{name}.m4
|
---|
588 | %if !0%{?os2_version}
|
---|
589 | %{bash_completionsdir}/c*
|
---|
590 | %endif
|
---|
591 | %if %{with emacs}
|
---|
592 | %if 0%{?fedora} || 0%{?rhel} >= 7
|
---|
593 | %{_emacs_sitelispdir}/%{name}
|
---|
594 | %{_emacs_sitestartdir}/%{name}-init.el
|
---|
595 | %else
|
---|
596 | %{_emacs_sitelispdir}
|
---|
597 | %{_emacs_sitestartdir}
|
---|
598 | %endif
|
---|
599 | %endif
|
---|
600 | %if !0%{?os2_version}
|
---|
601 | %{vimfiles_root}/indent/%{name}.vim
|
---|
602 | %{vimfiles_root}/syntax/%{name}.vim
|
---|
603 | %endif
|
---|
604 | %if 0%{?os2_version}
|
---|
605 | %ghost %{_datadir}/%{name}/Modules/Platform/os2.cmake
|
---|
606 | %endif
|
---|
607 |
|
---|
608 | %files doc
|
---|
609 | # Pickup license-files from main-pkg's license-dir
|
---|
610 | # If there's no license-dir they are picked up by %%doc previously
|
---|
611 | %{?_licensedir:%license %{_datadir}/licenses/%{name}*}
|
---|
612 | %doc %{_pkgdocdir}
|
---|
613 |
|
---|
614 |
|
---|
615 | %files filesystem -f data_dirs.mf -f lib_dirs.mf
|
---|
616 |
|
---|
617 |
|
---|
618 | %if %{with gui}
|
---|
619 | %files gui
|
---|
620 | %if !0%{?os2_version}
|
---|
621 | %{_bindir}/%{name}-gui
|
---|
622 | %else
|
---|
623 | %{_bindir}/%{name}-gui.exe
|
---|
624 | %endif
|
---|
625 | %if %{with appdata}
|
---|
626 | %{_metainfodir}/*.appdata.xml
|
---|
627 | %endif
|
---|
628 | %if !0%{?os2_version}
|
---|
629 | %{_datadir}/applications/%{name}-gui.desktop
|
---|
630 | %{_datadir}/mime/packages
|
---|
631 | %{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
|
---|
632 | %endif
|
---|
633 | %if %{with sphinx}
|
---|
634 | %{_mandir}/man1/%{name}-gui.1.*
|
---|
635 | %endif
|
---|
636 | %endif
|
---|
637 |
|
---|
638 |
|
---|
639 | %files rpm-macros
|
---|
640 | %{rpm_macros_dir}/macros.%{name}
|
---|
641 | %if %{with rpm} && 0%{?_rpmconfigdir:1}
|
---|
642 | %{_rpmconfigdir}/fileattrs/%{name}.attr
|
---|
643 | %{_rpmconfigdir}/%{name}.prov
|
---|
644 | %{_rpmconfigdir}/%{name}.req
|
---|
645 | %endif
|
---|
646 |
|
---|
647 |
|
---|
648 | %changelog
|
---|
649 | * Fri Feb 24 2023 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.20.6-2
|
---|
650 | - fix a crash
|
---|
651 | - enable system jsoncpp
|
---|
652 |
|
---|
653 | * Fri Jan 27 2023 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.20.6-1
|
---|
654 | - update to vendor version 3.20.6
|
---|
655 | - resync spec file with fedora
|
---|
656 |
|
---|
657 | * Fri Jan 31 2020 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.15.3-1
|
---|
658 | - update to vendor version 3.15.3
|
---|
659 | - build with gcc9
|
---|
660 | - add rc file handling
|
---|
661 | - disable 1121 wlink messages
|
---|
662 | - don't use emxexp for c++ by default anymore, it relies on declspec
|
---|
663 | if you want the old way use -DOS2_USE_CXX_EMXEXP=ON
|
---|
664 |
|
---|
665 | * Mon Sep 16 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.10.3-1
|
---|
666 | - update to vendor version 3.10.3
|
---|
667 |
|
---|
668 | * Wed Jan 25 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.7.0-2
|
---|
669 | - adjust def file creation
|
---|
670 |
|
---|
671 | * Mon Dec 05 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.7.0-1
|
---|
672 | - initial rpm version
|
---|