Use vendored dependencies in RHEL builds
RHEL does not include packages for Go module dependencies.
This commit is contained in:
parent
4c463238a7
commit
8d56dc14d0
@ -30,10 +30,16 @@ Provides: go-md2man = %{version}-%{release}
|
||||
%gopkg
|
||||
|
||||
%prep
|
||||
%if %{defined rhel}
|
||||
%goprep -k
|
||||
# unpack vendored dependencies to GOPATH
|
||||
tar c -C vendor/ . | tar x -C %{gobuilddir}/src
|
||||
%else
|
||||
%goprep
|
||||
|
||||
%generate_buildrequires
|
||||
%go_generate_buildrequires
|
||||
%endif
|
||||
|
||||
%build
|
||||
%gobuild -o %{gobuilddir}/bin/go-md2man %{goipath}
|
||||
@ -52,7 +58,7 @@ install -Dpm 0644 go-md2man.1 -t %{buildroot}%{_mandir}/man1/
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%license LICENSE.md %{?rhel:vendor/modules.txt}
|
||||
%doc go-md2man.1.md README.md
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/go-md2man.1*
|
||||
|
Loading…
Reference in New Issue
Block a user