# Generated by go2rpm 1.19.0 %bcond check 1 # https://github.com/betterleaks/betterleaks %global goipath github.com/betterleaks/betterleaks Version: 1.0.1 %gometa -L -f Name: betterleaks Release: %autorelease Summary: Secrets scanner built for configurability and speed # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND ISC 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: git-core BuildRequires: go-vendor-tools Requires: git-core %description A Better Secrets Scanner built for configurability and speed. %prep %goprep -p1 tar -xf %{S:1} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export GO_LDFLAGS="-X=github.com/betterleaks/betterleaks/version.Version=%{VERSION}" %gobuild -o %{gobuilddir}/bin/betterleaks %{goipath} %{gobuilddir}/bin/%{name} completion bash > %{name}.bash %{gobuilddir}/bin/%{name} completion fish > %{name}.fish %{gobuilddir}/bin/%{name} completion zsh > %{name}.zsh %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm 0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dpm 0644 %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish install -Dpm 0644 %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %doc docs README.md %{_bindir}/betterleaks %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %changelog %autochangelog