# Generated by go2rpm 1.19.0 %bcond check 1 # https://github.com/kubernetes/kompose %global goipath github.com/kubernetes/kompose Version: 1.38.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 Source3: README-documentation.txt BuildRequires: go-vendor-tools BuildRequires: git-core %description Convert Docker Compose to Kubernetes. # exclude doc subpackage - provided as jekyll based web site # %%package doc # Summary: Documentation for kompose # Enhances: kompose # Recommends: rubygem-bundler # %%description doc # Kompose documentation - see included README.md for instructions %prep %goprep -p1 tar -xf %{S:1} # add README-documentation.txt cp -p %{S:3} . # correct end-of-line encodings for documentation # sed -i 's/\r$//' docs/assets/css/*.css # sed -i 's/\r$//' docs/assets/js/*.js %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on # set currentgoldflags to nil; blocks default go macro -X version strings %global currentgoldflags %nil export GO_LDFLAGS=" -X %{goipath}/pkg/version.GITCOMMIT=%{release}" %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} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %doc README.md README-documentation.txt %{_bindir}/kompose # %%files doc # %%license docs/LICENSE # %%doc docs %changelog %autochangelog