# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/direnv/direnv %global goipath github.com/direnv/direnv/v2 Version: 2.37.1 %gometa -L -f Name: direnv Release: %autorelease Summary: Per-directory shell configuration tool # Generated by go-vendor-tools License: BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools BuildRequires: /usr/bin/go-md2man %description direnv augments existing shells with a new feature that can load and unload environment variables depending on the current directory. %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 %gobuild -o %{gobuilddir}/bin/direnv %{goipath} find man/ -name "*.md" -exec sh -c 'go-md2man -in="{}" -out="$(echo "{}" | sed "s|\.md||g")"' \; %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_mandir}/man1 install -m 0755 -vp man/*.1 %{buildroot}%{_mandir}/man1/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs CHANGELOG.md CONTRIBUTING.md README.md version.txt %{_bindir}/direnv %{_mandir}/man1/direnv*.1* %changelog %autochangelog