# # spec file for package cf-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 code.cloudfoundry %global provider_tld org %global project "" %global repo cli %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} Name: cf-cli Version: 6.31.0 Release: 0 License: Apache-2.0 Summary: Cloud Foundry command line client Url: https://github.com/cloudfoundry/cli Group: System/Management Source: https://github.com/cloudfoundry/cli/archive/v%{version}.tar.gz Source1: README BuildRequires: go >= 1.8.3 BuildRequires: golang-packaging BuildRequires: xz BuildRequires: golang-github-jteeuwen-go-bindata BuildRoot: %{_tmppath}/%{name}-%{version}-build %{go_nostrip} %{go_provides} %description This is the official command line client for Cloud Foundry. %prep %setup -q -c -n %{name}-%{version} mv */* ./ cp %{SOURCE1} ./ %build # 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' go-bindata -nometadata -pkg resources -ignore ".go" -o cf/resources/i18n_resources.go cf/i18n/resources/*.all.json %goprep %{import_path} %gobuild %install cp ../go/bin/cli %{buildroot}/%{_bindir}/cf install -m 755 -d %{buildroot}/%{_sysconfdir}/bash_completion.d cp ci/installers/completion/cf %{buildroot}/%{_sysconfdir}/bash_completion.d/cf.sh %files %defattr(-,root,root,-) %{_bindir}/cf %config %{_sysconfdir}/bash_completion.d/cf.sh %doc LICENSE NOTICE README %changelog