# Generated by go2rpm 1.17.1.post0 %bcond check 1 # https://github.com/kubernetes/kompose %global goipath github.com/kubernetes/kompose Version: 1.37.0 %global tag v%{gsub %{version} ~ -} %gometa -L -f Name: kompose Release: %autorelease Summary: Convert Docker Compose to Kubernetes # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools BuildRequires: git-core %description Convert Docker Compose to Kubernetes. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %global go_ldflags -X %{goipath}/pkg/version.GITCOMMIT=%{release} export GO_LDFLAGS="%{go_ldflags}" %gobuild -o %{gobuilddir}/bin/kompose %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} export GO_LDFLAGS="%{go_ldflags}" # settings adapted from Makefile 'test-unit' # append -v to gotestflags to print names of packages when compiled # the -race flag conflicts with `buildmode pie` %global gotestflags -short -compiler gc -race -cover %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs examples README.md %{_bindir}/kompose %changelog %autochangelog