Accepting request 629744 from home:okurz:branches:Cloud:Tools
Change to single-spec package self-test as discussed OBS-URL: https://build.opensuse.org/request/show/629744 OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cf-cli?expand=0&rev=50
This commit is contained in:
parent
a94ce4d6a9
commit
5d5ae87312
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,44 +0,0 @@
|
||||
#
|
||||
# spec file for package cf-cli-test
|
||||
#
|
||||
# Copyright (c) 2018 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/
|
||||
#
|
||||
|
||||
|
||||
%define short_name cf-cli
|
||||
Name: %{short_name}-test
|
||||
Version: 6.38.0
|
||||
Release: 0
|
||||
Summary: Test package for Cloud Foundry command line client
|
||||
License: Apache-2.0
|
||||
BuildRequires: %{short_name} == %{version}
|
||||
|
||||
%description
|
||||
.
|
||||
|
||||
%prep
|
||||
# workaround to prevent post/install failing assuming this file for whatever
|
||||
# reason
|
||||
touch %{_sourcedir}/%{short_name}
|
||||
|
||||
%build
|
||||
# call one of the components but not openqa itself which would need a valid
|
||||
# configuration
|
||||
cf --help
|
||||
|
||||
%install
|
||||
# disable debug packages in package test to prevent error about missing files
|
||||
%define debug_package %{nil}
|
||||
|
||||
%changelog
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 17 07:49:30 UTC 2018 - okurz@suse.com
|
||||
|
||||
- Change package self-test to _multibuild single-spec file approach for easier
|
||||
handling of package submissions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 8 21:42:29 UTC 2018 - thardeck@suse.com
|
||||
|
||||
|
29
cf-cli.spec
29
cf-cli.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package cf-cli
|
||||
# spec file for package cf
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -16,6 +16,16 @@
|
||||
#
|
||||
|
||||
|
||||
# Define just "test" as a package in _multibuild file to distinguish test
|
||||
# instructions here
|
||||
%if "@BUILD_FLAVOR@" == ""
|
||||
%define _test 0
|
||||
%define name_ext %nil
|
||||
%else
|
||||
%define _test 1
|
||||
%define name_ext -test
|
||||
%endif
|
||||
|
||||
%global provider code.cloudfoundry
|
||||
%global provider_tld org
|
||||
%global project ""
|
||||
@ -24,7 +34,7 @@
|
||||
%global import_path %{provider_prefix}
|
||||
|
||||
%define short_name cf-cli
|
||||
Name: %{short_name}
|
||||
Name: %{short_name}%{?name_ext}
|
||||
Version: 6.38.0
|
||||
Release: 0
|
||||
Summary: Cloud Foundry command line client
|
||||
@ -34,6 +44,9 @@ Url: https://github.com/cloudfoundry/cli
|
||||
Source: v%{version}.tar.gz
|
||||
Source1: README
|
||||
Source2: cf-cli-rpmlintrc
|
||||
%if 0%{?_test}
|
||||
BuildRequires: %{short_name}
|
||||
%else
|
||||
BuildRequires: go >= 1.8.3
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: xz
|
||||
@ -41,16 +54,26 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%{go_nostrip}
|
||||
%{go_provides}
|
||||
%endif
|
||||
|
||||
%description
|
||||
This is the official command line client for Cloud Foundry.
|
||||
|
||||
%prep
|
||||
%if 0%{?_test}
|
||||
# workaround to prevent post/install failing assuming this file for whatever
|
||||
# reason
|
||||
touch %{_sourcedir}/%{short_name}
|
||||
%else
|
||||
%setup -q -c -n %{name}-%{version}
|
||||
mv */* ./
|
||||
cp %{SOURCE1} ./
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?_test}
|
||||
cf --help
|
||||
%else
|
||||
# show correct version instead of 0.0.0
|
||||
grep -rl "0.0.0-unknown-version" ./ | xargs sed -i 's/0.0.0-unknown-version/%{version}/g'
|
||||
%goprep %{import_path}
|
||||
@ -71,4 +94,6 @@ cp ci/installers/completion/cf %{buildroot}/%{_sysconfdir}/bash_completion.d/cf.
|
||||
%config %{_sysconfdir}/bash_completion.d/cf.sh
|
||||
%doc LICENSE NOTICE README
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user