2010-11-15 17:50:50 +01:00
|
|
|
#
|
2011-05-26 15:31:30 +02:00
|
|
|
# spec file for package cmake
|
2006-12-20 02:22:20 +01:00
|
|
|
#
|
2019-01-15 09:08:01 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
|
2018-11-22 10:14:24 +01:00
|
|
|
%define shortversion 3.13
|
2006-12-20 02:22:20 +01:00
|
|
|
Name: cmake
|
2019-01-15 09:08:01 +01:00
|
|
|
Version: 3.13.3
|
2012-01-25 19:09:37 +01:00
|
|
|
Release: 0
|
2014-06-21 12:43:44 +02:00
|
|
|
Summary: Cross-platform, open-source make system
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Tools/Building
|
2018-04-04 12:57:33 +02:00
|
|
|
URL: https://www.cmake.org/
|
2018-03-17 09:57:59 +01:00
|
|
|
Source0: https://www.cmake.org/files/v%{shortversion}/%{name}-%{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
|
2018-03-17 09:57:59 +01:00
|
|
|
Source5: https://www.cmake.org/files/v%{shortversion}/%{name}-%{version}-SHA-256.txt
|
|
|
|
Source6: https://www.cmake.org/files/v%{shortversion}/%{name}-%{version}-SHA-256.txt.asc
|
2015-08-15 10:18:06 +02:00
|
|
|
Source7: cmake.keyring
|
2012-08-14 12:26:12 +02:00
|
|
|
Patch2: cmake-fix-ruby-test.patch
|
2015-02-16 12:01:37 +01:00
|
|
|
# PATCH-FIX-UPSTREAM form.patch -- set the correct include path for the ncurses includes
|
|
|
|
Patch4: form.patch
|
|
|
|
# PATCH-FIX-UPSTREAM system-libs.patch -- allow choosing between bundled and system jsoncpp & form libs
|
|
|
|
Patch5: system-libs.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
|
|
|
|
Patch7: feature-suse-python-interp-search-order.patch
|
2018-02-14 09:22:50 +01:00
|
|
|
Patch8: c17-default.patch
|
2010-05-25 18:31:48 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
2016-04-16 17:19:18 +02:00
|
|
|
BuildRequires: libarchive-devel >= 3.0.2
|
|
|
|
BuildRequires: libbz2-devel
|
2018-04-16 12:53:57 +02:00
|
|
|
%if 0%{?suse_version} >= 1330
|
2018-04-04 12:57:33 +02:00
|
|
|
BuildRequires: libcurl-mini-devel
|
2018-04-16 12:53:57 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: libcurl-devel
|
|
|
|
%endif
|
2014-06-21 12:43:44 +02:00
|
|
|
BuildRequires: libexpat-devel
|
2018-05-23 09:32:09 +02:00
|
|
|
# exclude for SLE 12 and Leap 42.x
|
|
|
|
%if 0%{?suse_version} == 1315
|
|
|
|
%define system_libuv OFF
|
|
|
|
%else
|
|
|
|
BuildRequires: libuv-devel >= 1.10
|
|
|
|
%define system_libuv ON
|
|
|
|
%endif
|
2010-05-25 18:31:48 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2015-02-19 16:19:51 +01:00
|
|
|
# this is commented as it would create dependancy cycle between jsoncpp and cmake
|
|
|
|
#if 0%{?suse_version} > 1320
|
|
|
|
#BuildRequires: pkgconfig(jsoncpp)
|
|
|
|
#endif
|
2016-08-26 12:34:52 +02:00
|
|
|
BuildRequires: pkgconfig
|
2018-04-04 12:57:33 +02:00
|
|
|
BuildRequires: rhash-devel
|
2016-04-16 17:19:18 +02:00
|
|
|
BuildRequires: zlib-devel
|
2014-10-29 08:53:39 +01:00
|
|
|
BuildRequires: pkgconfig(liblzma)
|
2007-12-11 13:19:30 +01:00
|
|
|
Requires: make
|
2016-06-14 10:19:15 +02:00
|
|
|
# bnc#953842 - A python file is shipped so require python base so it can be run.
|
2018-01-03 13:25:52 +01:00
|
|
|
Requires: python3-base
|
2018-12-20 09:29:42 +01:00
|
|
|
Recommends: cmake-man
|
2006-12-20 02:22:20 +01:00
|
|
|
|
|
|
|
%description
|
2014-06-11 12:42:34 +02:00
|
|
|
CMake is a cross-platform, open-source build system
|
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.
|
|
|
|
echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURCE0}" | sha256sum -c
|
|
|
|
%setup -q
|
2018-01-05 01:49:45 +01:00
|
|
|
%autopatch -p1
|
2006-12-20 02:22:20 +01:00
|
|
|
|
|
|
|
%build
|
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} \
|
|
|
|
--datadir=/share/%{name} \
|
|
|
|
--docdir=/share/doc/packages/%{name} \
|
|
|
|
--mandir=/share/man \
|
2008-05-07 00:25:59 +02:00
|
|
|
--system-libs \
|
2015-02-16 12:01:37 +01:00
|
|
|
--no-system-jsoncpp \
|
2014-06-21 12:43:44 +02:00
|
|
|
--parallel=0%{jobs} \
|
2014-04-24 12:29:47 +02:00
|
|
|
--verbose \
|
2016-11-17 18:49:04 +01:00
|
|
|
--no-qt-gui \
|
|
|
|
-- \
|
2018-05-23 09:32:09 +02:00
|
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=%{system_libuv}
|
2011-09-19 21:29:30 +02:00
|
|
|
make VERBOSE=1 %{?_smp_mflags}
|
2006-12-20 02:22:20 +01:00
|
|
|
|
|
|
|
%install
|
2017-11-03 16:08:42 +01:00
|
|
|
%make_install
|
2010-05-25 18:31:48 +02:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
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
|
2015-08-15 10:18:06 +02:00
|
|
|
install -p -m0644 -D %{SOURCE3} %{buildroot}%{_libexecdir}/rpm/fileattrs/cmake.attr
|
|
|
|
install -p -m0755 -D %{SOURCE4} %{buildroot}%{_libexecdir}/rpm/cmake.prov
|
2015-04-04 21:47:04 +02:00
|
|
|
|
2018-08-17 15:35:17 +02:00
|
|
|
# Install bash completion symlinks
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
|
|
|
for f in %{buildroot}%{_datadir}/%{name}/completions/*
|
|
|
|
do
|
|
|
|
ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions
|
|
|
|
done
|
|
|
|
|
2014-06-21 12:43:44 +02:00
|
|
|
%fdupes %{buildroot}%{_datadir}/cmake
|
2006-12-20 02:22:20 +01:00
|
|
|
|
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)"
|
2014-08-18 10:21:42 +02:00
|
|
|
|
2006-12-20 02:22:20 +01:00
|
|
|
%files
|
2018-12-20 09:29:42 +01:00
|
|
|
%license Copyright.txt
|
|
|
|
%doc README.rst
|
|
|
|
%config %{_rpmconfigdir}/macros.d/macros.cmake
|
2015-08-15 10:18:06 +02:00
|
|
|
%{_libexecdir}/rpm
|
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
|
2014-06-21 12:43:44 +02:00
|
|
|
%doc %{_docdir}/%{name}
|
2018-08-17 15:35:17 +02:00
|
|
|
%{_datadir}/bash-completion
|
2007-12-11 13:19:30 +01:00
|
|
|
|
2007-03-29 12:01:34 +02:00
|
|
|
%changelog
|