6d9b1150cb
- Remove wrong FIXME from spec - Require qt5 gui everywhere as it on all supported platforms - Respect CFLAGS while bootstraping - Remove wrong FIXME from the spec - Add relwithdebinfo as default target to ease living of sci packages - Add possibility to switch between ninja and cmake by defining %__builder ninja prior %cmake call bnc#995752 OBS-URL: https://build.opensuse.org/request/show/423027 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=262
130 lines
4.6 KiB
RPMSpec
130 lines
4.6 KiB
RPMSpec
#
|
|
# spec file for package cmake
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: cmake
|
|
Version: 3.6.1
|
|
Release: 0
|
|
Summary: Cross-platform, open-source make system
|
|
License: BSD-3-Clause
|
|
Group: Development/Tools/Building
|
|
Url: http://www.cmake.org/
|
|
Source0: http://www.cmake.org/files/v3.6/%{name}-%{version}.tar.gz
|
|
Source1: cmake.macros
|
|
# bnc#947585 - Let CMake produces automatic RPM provides
|
|
Source3: cmake.attr
|
|
Source4: cmake.prov
|
|
Source5: http://www.cmake.org/files/v3.6/%{name}-%{version}-SHA-256.txt
|
|
Source6: http://www.cmake.org/files/v3.6/%{name}-%{version}-SHA-256.txt.asc
|
|
Source7: cmake.keyring
|
|
Patch2: cmake-fix-ruby-test.patch
|
|
# 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
|
|
# PATCH-FIX-UPSTREAM cmake-version-in-generated-files.patch -- version number to be found in OBS
|
|
Patch6: cmake-version-in-generated-files.patch
|
|
# PATCH-FIX-UPSTREAM cmake-hdf5-detection.patch badshah400@gmail.com -- Fix hdf5 detection with cmake >= 3.6 (https://gitlab.kitware.com/cmake/cmake/issues/16225)
|
|
Patch7: cmake-hdf5-detection.patch
|
|
BuildRequires: curl-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libarchive-devel >= 3.0.2
|
|
BuildRequires: libbz2-devel
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: ncurses-devel
|
|
# this is commented as it would create dependancy cycle between jsoncpp and cmake
|
|
#if 0%{?suse_version} > 1320
|
|
#BuildRequires: pkgconfig(jsoncpp)
|
|
#endif
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: pkgconfig(liblzma)
|
|
Requires: make
|
|
# bnc#953842 - A python file is shipped so require python base so it can be run.
|
|
Requires: python-base
|
|
Recommends: cmake-mans
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
CMake is a cross-platform, open-source build system
|
|
|
|
%prep
|
|
# 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
|
|
%patch2 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
export CXXFLAGS="%{optflags}"
|
|
# This is not autotools configure
|
|
./configure \
|
|
--prefix=%{_prefix} \
|
|
--datadir=/share/%{name} \
|
|
--docdir=/share/doc/packages/%{name} \
|
|
--mandir=/share/man \
|
|
--system-libs \
|
|
--no-system-jsoncpp \
|
|
--parallel=0%{jobs} \
|
|
--verbose \
|
|
--no-qt-gui
|
|
make VERBOSE=1 %{?_smp_mflags}
|
|
|
|
%install
|
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
|
mkdir -p %{buildroot}%{_libdir}/cmake
|
|
find %{buildroot}%{_datadir}/cmake -type f -print0 | xargs -0 chmod 644
|
|
# rpm macros
|
|
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/rpm/macros.cmake
|
|
|
|
# RPM auto provides
|
|
install -p -m0644 -D %{SOURCE3} %{buildroot}%{_libexecdir}/rpm/fileattrs/cmake.attr
|
|
install -p -m0755 -D %{SOURCE4} %{buildroot}%{_libexecdir}/rpm/cmake.prov
|
|
|
|
%fdupes %{buildroot}%{_datadir}/cmake
|
|
|
|
%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
|
|
# suse specific brp-25-symlink cramps the symlinks, hence the CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne) fail
|
|
./bin/ctest --force-new-ctest-process --output-on-failure %{?_smp_mflags} \
|
|
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2|CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne))"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config %{_sysconfdir}/rpm/macros.cmake
|
|
%{_libexecdir}/rpm
|
|
%{_bindir}/cpack
|
|
%{_bindir}/cmake
|
|
%{_bindir}/ctest
|
|
%{_bindir}/ccmake
|
|
%{_datadir}/cmake
|
|
%{_libdir}/cmake
|
|
%dir %{_datadir}/aclocal
|
|
%{_datadir}/aclocal/cmake.m4
|
|
%doc %{_docdir}/%{name}
|
|
|
|
%changelog
|