2010-11-15 17:50:50 +01:00
|
|
|
#
|
2021-05-29 14:03:06 +02:00
|
|
|
# spec file
|
2006-12-20 02:22:20 +01:00
|
|
|
#
|
2022-01-21 07:05:53 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2006-12-20 02:22:20 +01:00
|
|
|
#
|
2008-08-06 01:42:15 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-12 14:59:48 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-20 02:22:20 +01:00
|
|
|
#
|
|
|
|
|
2012-04-19 10:52:56 +02:00
|
|
|
|
2019-11-05 11:58:37 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
2022-02-01 13:27:12 +01:00
|
|
|
# Flavor gui
|
2019-10-28 08:01:26 +01:00
|
|
|
%if "%{flavor}" == "gui"
|
2020-02-05 16:03:33 +01:00
|
|
|
%define psuffix -ui
|
2019-11-05 11:58:37 +01:00
|
|
|
%bcond_without gui
|
2019-08-28 03:06:03 +02:00
|
|
|
%else
|
2019-11-05 11:58:37 +01:00
|
|
|
%bcond_with gui
|
2019-08-28 03:06:03 +02:00
|
|
|
%endif
|
2022-02-01 13:27:12 +01:00
|
|
|
# Where available, the gui-flavor also enables qhelp docs
|
|
|
|
%if "%{flavor}" == "gui" && 0%{?suse_version} > 1500
|
|
|
|
%bcond_without qhelp
|
|
|
|
%else
|
|
|
|
%bcond_with qhelp
|
|
|
|
%endif
|
|
|
|
# Flavor mini
|
2020-02-05 16:03:33 +01:00
|
|
|
%if "%{flavor}" == "mini"
|
|
|
|
%define psuffix -mini
|
|
|
|
%bcond_without mini
|
|
|
|
%else
|
|
|
|
%bcond_with mini
|
|
|
|
%endif
|
2022-02-01 13:27:12 +01:00
|
|
|
# Flavor full
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" == "full"
|
|
|
|
%define psuffix -full
|
|
|
|
%bcond_without full
|
|
|
|
%else
|
|
|
|
%bcond_with full
|
|
|
|
%endif
|
2022-03-30 08:36:07 +02:00
|
|
|
%define shortversion 3.23
|
2020-02-05 16:03:33 +01:00
|
|
|
Name: cmake%{?psuffix}
|
2022-03-30 08:36:07 +02:00
|
|
|
Version: 3.23.0
|
2019-08-28 03:06:03 +02:00
|
|
|
Release: 0
|
2020-02-05 16:03:33 +01:00
|
|
|
Summary: Cross-platform make system
|
|
|
|
License: BSD-3-Clause
|
2018-04-04 12:57:33 +02:00
|
|
|
URL: https://www.cmake.org/
|
2019-08-14 08:13:28 +02:00
|
|
|
Source0: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}.tar.gz
|
2013-08-16 11:35:44 +02:00
|
|
|
Source1: cmake.macros
|
2016-06-14 10:19:15 +02:00
|
|
|
# bnc#947585 - Let CMake produces automatic RPM provides
|
2015-04-04 21:47:04 +02:00
|
|
|
Source3: cmake.attr
|
|
|
|
Source4: cmake.prov
|
2019-08-14 08:13:28 +02:00
|
|
|
Source5: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}-SHA-256.txt
|
|
|
|
Source6: https://www.cmake.org/files/v%{shortversion}/cmake-%{version}-SHA-256.txt.asc
|
2015-08-15 10:18:06 +02:00
|
|
|
Source7: cmake.keyring
|
2020-02-20 15:59:00 +01:00
|
|
|
Source99: README.SUSE
|
2019-11-27 13:38:16 +01:00
|
|
|
Patch0: cmake-fix-ruby-test.patch
|
2018-01-05 01:49:45 +01:00
|
|
|
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
|
2019-11-27 13:38:16 +01:00
|
|
|
Patch1: feature-suse-python-interp-search-order.patch
|
2020-04-18 08:51:17 +02:00
|
|
|
Patch2: cmake-fix-png-include-dir.patch
|
2010-05-25 18:31:48 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
2016-08-26 12:34:52 +02:00
|
|
|
BuildRequires: pkgconfig
|
2018-04-04 12:57:33 +02:00
|
|
|
BuildRequires: rhash-devel
|
2019-11-05 11:58:37 +01:00
|
|
|
BuildRequires: pkgconfig(bzip2)
|
|
|
|
BuildRequires: pkgconfig(expat)
|
2014-10-29 08:53:39 +01:00
|
|
|
BuildRequires: pkgconfig(liblzma)
|
2020-02-05 16:03:33 +01:00
|
|
|
BuildRequires: pkgconfig(libssl)
|
2022-03-30 08:36:07 +02:00
|
|
|
%if %{suse_version} > 1500
|
|
|
|
BuildRequires: pkgconfig(libuv) >= 1.28
|
|
|
|
%endif
|
2019-11-05 11:58:37 +01:00
|
|
|
BuildRequires: pkgconfig(ncurses)
|
2019-10-28 08:01:26 +01:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" == ""
|
|
|
|
Requires: cmake-implementation = %{version}
|
|
|
|
%endif
|
|
|
|
%if %{with full} || %{with mini}
|
2007-12-11 13:19:30 +01:00
|
|
|
Requires: make
|
2020-02-05 16:03:33 +01:00
|
|
|
# bnc#953842 - A python file is shipped so require python base so it can be run.
|
|
|
|
Requires: python3-base
|
2020-02-20 15:59:00 +01:00
|
|
|
Conflicts: cmake-implementation
|
|
|
|
Provides: cmake-implementation = %{version}
|
|
|
|
%endif
|
2020-02-05 16:03:33 +01:00
|
|
|
%if %{with mini}
|
|
|
|
Requires: this-is-only-for-build-envs
|
2020-02-20 15:59:00 +01:00
|
|
|
%endif
|
|
|
|
%if %{with full} || %{with gui}
|
2020-02-10 22:08:19 +01:00
|
|
|
BuildRequires: pkgconfig(jsoncpp) >= 1.4.1
|
|
|
|
BuildRequires: pkgconfig(libarchive) >= 3.3.3
|
2020-02-05 16:03:33 +01:00
|
|
|
BuildRequires: pkgconfig(libcurl)
|
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2019-11-13 14:48:28 +01:00
|
|
|
%endif
|
|
|
|
%if %{with gui}
|
2020-02-05 16:03:33 +01:00
|
|
|
BuildRequires: python3-Sphinx
|
2019-08-14 08:13:28 +02:00
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
2019-02-15 10:23:04 +01:00
|
|
|
%endif
|
2022-02-01 13:27:12 +01:00
|
|
|
%if %{with qhelp}
|
|
|
|
BuildRequires: libqt5-qttools-qhelpgenerator
|
|
|
|
%endif
|
2006-12-20 02:22:20 +01:00
|
|
|
|
2020-02-05 16:03:33 +01:00
|
|
|
%description
|
|
|
|
CMake is a cross-platform build system.
|
|
|
|
|
2019-08-14 08:13:28 +02:00
|
|
|
%package -n cmake-man
|
2019-08-28 03:06:03 +02:00
|
|
|
Summary: Manual pages for cmake, a cross-platform make system
|
2020-02-05 16:03:33 +01:00
|
|
|
Supplements: cmake
|
2019-08-14 08:13:28 +02:00
|
|
|
|
|
|
|
%description -n cmake-man
|
2019-08-28 03:06:03 +02:00
|
|
|
Manual pages for cmake, a cross-platform make system.
|
2019-11-05 11:58:37 +01:00
|
|
|
|
2020-02-05 16:03:33 +01:00
|
|
|
%package -n cmake-gui
|
|
|
|
Summary: CMake graphical user interface
|
|
|
|
Requires: cmake
|
|
|
|
|
|
|
|
%description -n cmake-gui
|
2019-11-05 11:58:37 +01:00
|
|
|
This is a Graphical User Interface for CMake, a cross-platform
|
|
|
|
build system.
|
2006-12-20 02:22:20 +01:00
|
|
|
|
2022-02-01 13:27:12 +01:00
|
|
|
%package -n cmake-doc-qhelp
|
|
|
|
Summary: CMake documentation for offline reading - qhelp version
|
|
|
|
|
|
|
|
%description -n cmake-doc-qhelp
|
|
|
|
CMake documentation for offline reading - qhelp version.
|
|
|
|
|
2006-12-20 02:22:20 +01:00
|
|
|
%prep
|
2015-08-15 10:18:06 +02:00
|
|
|
# The publisher doesn't sign the source tarball, but a signatures file containing multiple hashes.
|
|
|
|
# Verify hashes in that file against source tarball.
|
2019-08-14 08:13:28 +02:00
|
|
|
echo "`grep cmake-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURCE0}" | sha256sum -c
|
2020-06-19 10:45:02 +02:00
|
|
|
%autosetup -p1 -n cmake-%{version}
|
2006-12-20 02:22:20 +01:00
|
|
|
|
|
|
|
%build
|
2020-06-19 10:45:02 +02:00
|
|
|
cp %{SOURCE99} .
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" != ""
|
2016-08-26 12:34:52 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CXXFLAGS="%{optflags}"
|
|
|
|
# This is not autotools configure
|
2007-07-23 19:55:10 +02:00
|
|
|
./configure \
|
|
|
|
--prefix=%{_prefix} \
|
2019-08-14 08:13:28 +02:00
|
|
|
--datadir=/share/cmake \
|
|
|
|
--docdir=/share/doc/packages/cmake \
|
2007-07-23 19:55:10 +02:00
|
|
|
--mandir=/share/man \
|
2008-05-07 00:25:59 +02:00
|
|
|
--system-libs \
|
2020-02-05 16:03:33 +01:00
|
|
|
%if %{with mini}
|
|
|
|
--no-system-curl \
|
2020-07-21 10:54:12 +02:00
|
|
|
--no-system-nghttp2 \
|
2015-02-16 12:01:37 +01:00
|
|
|
--no-system-jsoncpp \
|
2019-07-22 09:20:56 +02:00
|
|
|
--no-system-libarchive \
|
|
|
|
--no-system-zstd \
|
2020-02-05 16:03:33 +01:00
|
|
|
%endif
|
2014-06-21 12:43:44 +02:00
|
|
|
--parallel=0%{jobs} \
|
2014-04-24 12:29:47 +02:00
|
|
|
--verbose \
|
2022-03-30 08:36:07 +02:00
|
|
|
%if %{suse_version} < 1550
|
|
|
|
--no-system-libuv \
|
|
|
|
%endif
|
2022-02-01 13:27:12 +01:00
|
|
|
%if %{with qhelp}
|
|
|
|
--sphinx-qthelp \
|
|
|
|
%endif
|
2019-11-05 11:58:37 +01:00
|
|
|
%if %{with gui}
|
2019-08-14 08:13:28 +02:00
|
|
|
--qt-gui \
|
|
|
|
--sphinx-man \
|
2019-11-05 11:58:37 +01:00
|
|
|
%else
|
2016-11-17 18:49:04 +01:00
|
|
|
--no-qt-gui \
|
2019-11-05 11:58:37 +01:00
|
|
|
%endif
|
|
|
|
%{nil}
|
2020-02-05 16:03:33 +01:00
|
|
|
%make_build
|
2020-02-20 15:59:00 +01:00
|
|
|
%endif
|
2006-12-20 02:22:20 +01:00
|
|
|
|
|
|
|
%install
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" != ""
|
2017-11-03 16:08:42 +01:00
|
|
|
%make_install
|
2010-05-25 18:31:48 +02:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
2022-02-01 13:27:12 +01:00
|
|
|
|
2019-11-05 11:58:37 +01:00
|
|
|
%if %{with gui}
|
|
|
|
%suse_update_desktop_file -r cmake-gui CMake Development IDE Tools Qt
|
2019-08-14 08:13:28 +02:00
|
|
|
|
|
|
|
# delete files that belong to the 'cmake' package
|
|
|
|
rm -rf %{buildroot}%{_bindir}/{cpack,cmake,ctest,ccmake}
|
|
|
|
rm -rf %{buildroot}%{_datadir}/cmake
|
|
|
|
rm -rf %{buildroot}%{_datadir}/aclocal/cmake.m4
|
2020-07-21 10:54:12 +02:00
|
|
|
rm -rf %{buildroot}%{_datadir}/bash-completion/completions/{cmake,cpack,ctest}
|
|
|
|
rm -rf %{buildroot}%{_datadir}/emacs/site-lisp/cmake-mode.el
|
|
|
|
rm -rf %{buildroot}%{_datadir}/vim/
|
2022-02-01 13:27:12 +01:00
|
|
|
# delete docdir but preserve qhelp if applicable
|
|
|
|
find %{buildroot}%{_docdir}/cmake -mindepth 1 -not -name "CMake.qch" -delete
|
|
|
|
rmdir %{buildroot}%{_docdir}/cmake || true
|
2019-08-14 08:13:28 +02:00
|
|
|
%else
|
|
|
|
|
2014-06-21 12:43:44 +02:00
|
|
|
find %{buildroot}%{_datadir}/cmake -type f -print0 | xargs -0 chmod 644
|
2013-08-16 11:35:44 +02:00
|
|
|
# rpm macros
|
2018-12-20 09:29:42 +01:00
|
|
|
install -m644 %{SOURCE1} -D %{buildroot}%{_rpmconfigdir}/macros.d/macros.cmake
|
2012-11-02 15:31:52 +01:00
|
|
|
|
2015-04-04 21:47:04 +02:00
|
|
|
# RPM auto provides
|
2020-07-24 08:14:49 +02:00
|
|
|
install -p -m0644 -D %{SOURCE3} %{buildroot}%{_fileattrsdir}/cmake.attr
|
|
|
|
install -p -m0755 -D %{SOURCE4} %{buildroot}%{_rpmconfigdir}/cmake.prov
|
2015-04-04 21:47:04 +02:00
|
|
|
|
2020-02-05 16:03:33 +01:00
|
|
|
# fix: W: files-duplicate (%%license covers already)
|
|
|
|
rm %{buildroot}%{_docdir}/cmake/Copyright.txt
|
2019-02-26 00:32:48 +01:00
|
|
|
|
2014-06-21 12:43:44 +02:00
|
|
|
%fdupes %{buildroot}%{_datadir}/cmake
|
2020-02-05 16:03:33 +01:00
|
|
|
%endif
|
2020-02-20 15:59:00 +01:00
|
|
|
%endif
|
2006-12-20 02:22:20 +01:00
|
|
|
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" == "full"
|
2014-08-18 10:21:42 +02:00
|
|
|
%check
|
|
|
|
# Excluded tests:
|
|
|
|
# TestUpload: uses internet connection
|
|
|
|
# SimpleInstall: seems to fail due to RPATH strictness
|
|
|
|
# if any other app installs then this test is bogus
|
2015-07-28 06:25:43 +02:00
|
|
|
# suse specific brp-25-symlink cramps the symlinks, hence the CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne) fail
|
2014-08-18 10:21:42 +02:00
|
|
|
./bin/ctest --force-new-ctest-process --output-on-failure %{?_smp_mflags} \
|
2016-11-16 13:51:15 +01:00
|
|
|
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2|CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne)|CPack_RPM)"
|
2019-08-14 08:13:28 +02:00
|
|
|
%endif
|
2014-08-18 10:21:42 +02:00
|
|
|
|
2022-02-01 13:27:12 +01:00
|
|
|
%if %{with qhelp}
|
|
|
|
%files -n cmake-doc-qhelp
|
|
|
|
%license Copyright.txt
|
|
|
|
%{_docdir}/cmake/CMake.qch
|
|
|
|
%endif
|
|
|
|
|
2019-11-05 11:58:37 +01:00
|
|
|
%if %{with gui}
|
|
|
|
%files -n cmake-gui
|
2019-08-14 08:13:28 +02:00
|
|
|
%license Copyright.txt
|
|
|
|
%{_bindir}/cmake-gui
|
2020-02-05 16:03:33 +01:00
|
|
|
%{_datadir}/applications/cmake-gui.desktop
|
2019-08-14 08:13:28 +02:00
|
|
|
%{_datadir}/mime/packages/cmakecache.xml
|
|
|
|
%dir %{_datadir}/icons/hicolor
|
|
|
|
%dir %{_datadir}/icons/hicolor/*
|
|
|
|
%dir %{_datadir}/icons/hicolor/*/*
|
|
|
|
%{_datadir}/icons/hicolor/128x128/apps/CMakeSetup.png
|
|
|
|
%{_datadir}/icons/hicolor/32x32/apps/CMakeSetup.png
|
|
|
|
|
|
|
|
%files -n cmake-man
|
|
|
|
%license Copyright.txt
|
|
|
|
%{_mandir}/man7/*
|
|
|
|
%{_mandir}/man1/*
|
2022-02-01 13:27:12 +01:00
|
|
|
|
2019-08-14 08:13:28 +02:00
|
|
|
%else
|
2021-03-16 01:15:30 +01:00
|
|
|
|
2006-12-20 02:22:20 +01:00
|
|
|
%files
|
2020-02-20 15:59:00 +01:00
|
|
|
%if "%{flavor}" == ""
|
|
|
|
%doc README.SUSE
|
|
|
|
%else
|
2019-02-12 15:17:26 +01:00
|
|
|
%license Copyright.txt
|
2018-12-20 09:29:42 +01:00
|
|
|
%doc README.rst
|
2020-02-10 22:08:19 +01:00
|
|
|
%{_rpmconfigdir}/macros.d/macros.cmake
|
2020-07-24 08:14:49 +02:00
|
|
|
%{_fileattrsdir}/cmake.attr
|
|
|
|
%{_rpmconfigdir}/cmake.prov
|
2010-05-25 18:31:48 +02:00
|
|
|
%{_bindir}/cpack
|
|
|
|
%{_bindir}/cmake
|
|
|
|
%{_bindir}/ctest
|
|
|
|
%{_bindir}/ccmake
|
|
|
|
%{_datadir}/cmake
|
2010-07-21 14:27:51 +02:00
|
|
|
%{_libdir}/cmake
|
2014-04-24 12:29:47 +02:00
|
|
|
%dir %{_datadir}/aclocal
|
2011-10-14 14:45:21 +02:00
|
|
|
%{_datadir}/aclocal/cmake.m4
|
2020-02-05 16:03:33 +01:00
|
|
|
%doc %{_docdir}/cmake
|
2020-07-21 10:54:12 +02:00
|
|
|
%dir %{_datadir}/bash-completion
|
|
|
|
%dir %{_datadir}/bash-completion/completions
|
|
|
|
%{_datadir}/bash-completion/completions/{cmake,cpack,ctest}
|
|
|
|
%dir %{_datadir}/emacs
|
|
|
|
%dir %{_datadir}/emacs/site-lisp
|
|
|
|
%{_datadir}/emacs/site-lisp/cmake-mode.el
|
|
|
|
%dir %{_datadir}/vim
|
|
|
|
%dir %{_datadir}/vim/vimfiles
|
|
|
|
%dir %{_datadir}/vim/vimfiles/indent
|
|
|
|
%{_datadir}/vim/vimfiles/indent/cmake.vim
|
|
|
|
%dir %{_datadir}/vim/vimfiles/syntax
|
|
|
|
%{_datadir}/vim/vimfiles/syntax/cmake.vim
|
2019-08-14 08:13:28 +02:00
|
|
|
%endif
|
2020-02-20 15:59:00 +01:00
|
|
|
%endif
|
2007-12-11 13:19:30 +01:00
|
|
|
|
2007-03-29 12:01:34 +02:00
|
|
|
%changelog
|