# Generated by go2rpm 1.18.0 %bcond check 1 #cmd: go2rpm -L -p vendor --download --name ytt carvel.dev/ytt --forge https://github.com/carvel-dev/ytt ## note: forge url is a must, otherwise build will failed different package name ## cannot find module providing package github.com/carvel-dev/ytt/cmd/ytt: import lookup disabled by -mod=vendor # https://github.com/carvel-dev/ytt %global goipath carvel.dev/ytt %global forgeurl https://github.com/carvel-dev/ytt Version: 0.52.1 %gometa -L -f Name: ytt Release: %autorelease Summary: YAML templating tool that works on YAML structure instead of text # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LicenseRef-scancode-proprietary-license AND LicenseRef-scancode-unknown-license-reference AND MIT AND MIT-0 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 %description YAML templating tool that works on YAML structure instead of text. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build ## to pass the test and make function like `version.require_at_least("0.0.0")` work. export GO_LDFLAGS="-X carvel.dev/ytt/pkg/version.Version=%{version}" %global gomodulesmode GO111MODULE=on ## build binary to template all website assets into a single Go file ## exlucde ytt-lambda-website for cmd in cmd/* ; do if [[ "ytt-lambda-website" == $(basename $cmd) ]] ; then continue; fi %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done ## see https://github.com/carvel-dev/ytt/blob/develop/hack/generate-website-assets.sh ## and https://github.com/carvel-dev/ytt/blob/develop/hack/build.sh pushd pkg/website %{gobuilddir}/bin/%{name} -f . \ -f ../../examples/playground/basics \ -f ../../examples/playground/overlays \ -f ../../examples/playground/getting-started \ --file-mark 'alt-example**/*:type=data' \ --file-mark 'example**/*:type=data' \ --file-mark 'generated.go.txt:exclusive-for-output=true' \ --dangerous-emptied-output-directory ../../tmp/ popd mv tmp/generated.go.txt pkg/website/generated.go ## build again rm %{gobuilddir}/bin/%{name} for cmd in cmd/* ; do if [[ "ytt-lambda-website" == $(basename $cmd) ]] ; then continue; fi %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %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} cp %{gobuilddir}/bin/%{name} . %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs examples CODE_OF_CONDUCT.md CONTRIBUTING.md GOVERNANCE.md %doc MAINTAINERS.md README.md ROADMAP.md SECURITY.md code-header-template.txt %doc pkg/texttemplate/filetests/code-after-code.txt %doc pkg/texttemplate/filetests/code-with-comments.txt %doc pkg/texttemplate/filetests/def-err-invalid.txt %doc pkg/texttemplate/filetests/def.txt %doc pkg/texttemplate/filetests/empty-code-block.txt %doc pkg/texttemplate/filetests/empty.txt %doc pkg/texttemplate/filetests/escape-err.txt %doc pkg/texttemplate/filetests/escape.txt pkg/texttemplate/filetests/for.txt %doc pkg/texttemplate/filetests/if.txt pkg/texttemplate/filetests/no-code.txt %doc pkg/texttemplate/filetests/non-printing-code.txt %doc pkg/texttemplate/filetests/printing-code.txt %doc pkg/texttemplate/filetests/unclosed-code.txt %doc pkg/texttemplate/filetests/var-err-undefined.txt %doc pkg/website/generated.go.txt proposals/README.md %doc proposals/001-schemas/README.md %{_bindir}/ytt %changelog %autochangelog