%define debug %nil %define debug_package %nil Name: pulumi Version: 3.18.0 Release: 1 Summary: Modern Infrastructure as Code URL: https://www.pulumi.com Source0: https://github.com/pulumi/pulumi/archive/v%{version}/%{name}-%{version}.tar.gz License: ASL 2.0 Group: Development/Other BuildRequires: go >= 1.16 BuildRequires: git-core %description Pulumi's Infrastructure as Code SDK is the easiest way to create and deploy cloud software that use containers, serverless functions, hosted services, and infrastructure, on any cloud. %prep %setup -q #------------------------------------------------------------------------------- %package -n %{name}-language-go Summary: Pulumi laguage go Requires: %{name} = %{EVRD} %description -n %{name}-language-go Pulumi language go %files -n %{name}-language-go %doc README.md LICENSE %{_bindir}/%{name}-language-go #------------------------------------------------------------------------------- %build export GO111MODULE=on pushd pkg go mod download go build "-buildmode=pie" -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=%{version}" -o ../bin/%{name} ./cmd/pulumi popd # build pulumi-language-go pushd sdk go mod download go build -ldflags "-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=%{version}" -o ../bin/%{name}-language-go ../sdk/go/%{name}-language-go #go build -ldflags "-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=%{version}" -o ../bin/%{name}-language-python ../sdk/python/cmd/%{name}-language-python #go build -ldflags "-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=%{version}" -o ../bin/%{name}-language-javascript ../sdk/nodejs/cmd/%{name}-language-nodejs popd %install install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} install -Dm0755 bin/pulumi-language-go %{buildroot}%{_bindir}/%{name}-language-go # install bash completion install -d %{buildroot}%{_sysconfdir}/bash_completion.d/ ./bin/%{name} gen-completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} %files %doc sdk/go/README.md LICENSE %{_bindir}/%{name} %{_sysconfdir}/bash_completion.d/%{name}