# script fails to generate the debuginfos, filelists %global debug_package %{nil} %global commit 51011e4849252c723b520643d27d3fa164d28c61 %global tag 202006250705.p0 Name: openshift-clients Version: 4.6.0 Release: %tag.1%{?dist} Summary: OpenShift Clinet CLI tool License: ASL 2.0 URL: https://github.com/openshift/oc %global nvt %{name}-%{version}-%{tag} Source0: https://github.com/openshift/oc/archive/%{nvt}.tar.gz BuildRequires: golang, krb5-devel, make, rsync %description Command line tool for interacting and setting up OpenShift clusters. %package redistributables Summary: OpenShift CLI binaries for Mac OSX and Windows %description redistributables OpenShift CLI binaries for Mac OSX and Windows %prep # somehow name of the dir is totally different %autosetup -n oc-openshift-clients-4.6.0-202006250705.p0 %build export SOURCE_GIT_COMMIT=%{commit} export SOURCE_GIT_TAG=%{nvt} export SOURCE_GIT_TREE_STATE=clean make oc # redistributable clients for win and macos make cross-build-darwin-amd64 make cross-build-windows-amd64 %install ls -al install -d %{buildroot}%{_bindir} install -p -m 755 oc %{buildroot}%{_bindir}/oc #install redistributables install -d %{buildroot}%{_datadir}/%{name}/{macosx,windows} install -p -m 755 _output/bin/darwin_amd64/oc %{buildroot}/%{_datadir}/%{name}/macosx/oc install -p -m 755 _output/bin/windows_amd64/oc.exe %{buildroot}/%{_datadir}/%{name}/windows/oc.exe %files %license LICENSE %doc README.md %{_bindir}/oc %files redistributables %license LICENSE %doc README.md %{_datadir}/%{name}/macosx/oc %{_datadir}/%{name}/windows/oc.exe %changelog * Mon Jul 27 2020 Jakub Čajka - 4.6.0-202006250705.p0-1 - Initial package