SHA256
1
0
forked from pool/cmake

Accepting request 777424 from home:dimstar:Factory

- Change cmake to be a meta-package that requires
  cmake-implementation. This new symbol is provided by the (newly
  named) cmake-full package as well as cmake-mini.
- This is needed as the original attempt of using Substitute in OBS
  actually rewrites the used spec files on disk, not only on the
  fly and we ended up with packages Requiring cmake-mini (which is
  not installable on end user systems).

OBS-URL: https://build.opensuse.org/request/show/777424
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=400
This commit is contained in:
Martin Pluskal 2020-02-20 14:59:00 +00:00 committed by Git OBS Bridge
parent ec7529e107
commit 0340d959b8
4 changed files with 55 additions and 7 deletions

14
README.SUSE Normal file
View File

@ -0,0 +1,14 @@
The package 'cmake' only ships a README.SUSE file and serves
as a meta-package.
cmake requires cmake-implementation, which inside OBS is provided by
* cmake-mini (minimal cmake variant, no especially no libcurl/libarchive)
* cmake-full (what used to be called cmake before)
This complex setup was done in order to be able to eliminate build cycles, as
more and more tools were moving to cmake as build system, but with curl in the
build chain, was making it increasingly difficult to break the cycle.
cmake-mini is not meant for installation on end-user systems (where it also would
not save a lot; as an end user, you have libcurl on your system anyway due to libzypp)
and is thus not part of the FTP Tree.

View File

@ -1,4 +1,5 @@
<multibuild>
<package>mini</package>
<package>gui</package>
<flavor>mini</flavor>
<flavor>full</flavor>
<flavor>gui</flavor>
</multibuild>

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Feb 19 13:30:34 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Change cmake to be a meta-package that requires
cmake-implementation. This new symbol is provided by the (newly
named) cmake-full package as well as cmake-mini.
- This is needed as the original attempt of using Substitute in OBS
actually rewrites the used spec files on disk, not only on the
fly and we ended up with packages Requiring cmake-mini (which is
not installable on end user systems).
-------------------------------------------------------------------
Mon Feb 10 15:26:56 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -29,6 +29,13 @@
%else
%bcond_with mini
%endif
%if "%{flavor}" == "full"
%define psuffix -full
%bcond_without full
%else
%bcond_with full
%endif
%define shortversion 3.16
Name: cmake%{?psuffix}
Version: 3.16.2
@ -44,6 +51,7 @@ Source4: cmake.prov
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
Source7: cmake.keyring
Source99: README.SUSE
Patch0: cmake-fix-ruby-test.patch
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
Patch1: feature-suse-python-interp-search-order.patch
@ -58,19 +66,24 @@ BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(libuv) >= 1.10
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(zlib)
%if "%{flavor}" == ""
Requires: cmake-implementation = %{version}
%endif
%if %{with full} || %{with mini}
Requires: make
# bnc#953842 - A python file is shipped so require python base so it can be run.
Requires: python3-base
Conflicts: cmake-implementation
Provides: cmake-implementation = %{version}
%endif
%if %{with mini}
Requires: this-is-only-for-build-envs
Conflicts: cmake
Provides: cmake = %{version}
%else
%endif
%if %{with full} || %{with gui}
BuildRequires: pkgconfig(jsoncpp) >= 1.4.1
BuildRequires: pkgconfig(libarchive) >= 3.3.3
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libzstd)
Conflicts: cmake-mini
%endif
%if %{with gui}
BuildRequires: python3-Sphinx
@ -102,8 +115,10 @@ build system.
echo "`grep cmake-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURCE0}" | sha256sum -c
%setup -q -n cmake-%{version}
%autopatch -p1
cp %{SOURCE99} .
%build
%if "%{flavor}" != ""
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
# This is not autotools configure
@ -129,8 +144,10 @@ export CXXFLAGS="%{optflags}"
%endif
%{nil}
%make_build
%endif
%install
%if "%{flavor}" != ""
%make_install
mkdir -p %{buildroot}%{_libdir}/cmake
%if %{with gui}
@ -167,8 +184,9 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt
%fdupes %{buildroot}%{_datadir}/cmake
%endif
%endif
%if "%{flavor}" == ""
%if "%{flavor}" == "full"
%check
# Excluded tests:
# TestUpload: uses internet connection
@ -197,6 +215,9 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt
%{_mandir}/man1/*
%else
%files
%if "%{flavor}" == ""
%doc README.SUSE
%else
%license Copyright.txt
%doc README.rst
%{_rpmconfigdir}/macros.d/macros.cmake
@ -214,5 +235,6 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt
%cmake_mode_el
%dir %{dirname:%cmake_mode_el}
%endif
%endif
%changelog