File bosh-cli.spec of Package bosh-cli
#
# 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/
#
%global provider github
%global provider_tld com
%global project cloudfoundry
%global repo bosh-cli
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
Name: bosh-cli
Version: 6.4.1
Release: 0
License: Apache-2.0
Summary: BOSH Command Line Interface (written in go)
Url: https://github.com/cloudfoundry/bosh-cli
Group: System/Management
Source: v%{version}.tar.gz
Source1: README
Source2: bosh-cli-rpmlintrc
Requires: xz
BuildRequires: golang-packaging
BuildRequires: go >= 1.14
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{go_nostrip}
%{go_provides}
%description
Bosh-cli is the command line interface to interact with BOSH, currently the default tool for managing Cloud Foundry deployments. BOSH is a project that unifies release engineering, deployment, and lifecycle management of small and large-scale cloud software. BOSH can provision and deploy software over hundreds of VMs. It also performs monitoring, failure recovery, and software updates with zero-to-minimal downtime.
%prep
%setup -q -c -n %{name}-%{version}
mv */* ./
cp %{SOURCE1} ./
# set version for "DEV BUILD" (like ci/build.sh)
if [ -e cmd/version.go ]; then
sed -i -e 's/\[DEV BUILD\]/%{version}/g' cmd/version.go
else
echo "Failed to adjust version"
fi
%build
%goprep %{import_path}
%gobuild
%install
cp ../go/bin/bosh-cli %{buildroot}/%{_bindir}/bosh
%files
%defattr(-,root,root,-)
%{_bindir}/bosh
%doc LICENSE NOTICE README
%changelog