From 0340d959b887f36ef80a6656b3eab44797d494348e8df072b5ff8cfbb520d785 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 20 Feb 2020 14:59:00 +0000 Subject: [PATCH] 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 --- README.SUSE | 14 ++++++++++++++ _multibuild | 5 +++-- cmake.changes | 11 +++++++++++ cmake.spec | 32 +++++++++++++++++++++++++++----- 4 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 README.SUSE diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..fcdff00 --- /dev/null +++ b/README.SUSE @@ -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. diff --git a/_multibuild b/_multibuild index 9b2cdbd..eae5d3f 100644 --- a/_multibuild +++ b/_multibuild @@ -1,4 +1,5 @@ - mini - gui + mini + full + gui diff --git a/cmake.changes b/cmake.changes index 8245300..bd9e6b8 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Feb 19 13:30:34 UTC 2020 - Dominique Leuenberger + +- 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 diff --git a/cmake.spec b/cmake.spec index 950d3ac..128073c 100644 --- a/cmake.spec +++ b/cmake.spec @@ -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