Use vendored dependencies in RHEL builds

The upstream release tarballs include the vendored dependencies.  In
Fedora builds, %goprep will remove them and still use dynamic
buildrequires, but RHEL does not package those and needs to use the
vendoring.
This commit is contained in:
Yaakov Selkowitz 2023-08-09 10:17:36 -04:00
parent 5f1166560a
commit 90dd74e915
3 changed files with 9 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/yggdrasil-ffb580f55ae91beff78156fdb6a41be8bc049117.tar.gz /yggdrasil-ffb580f55ae91beff78156fdb6a41be8bc049117.tar.gz
/yggdrasil-0.3.1.tar.gz /yggdrasil-0.3.1.tar.gz
/yggdrasil-0.3.2.tar.gz /yggdrasil-0.3.2.tar.gz
/yggdrasil-0.3.2.tar.xz

View File

@ -1 +1 @@
SHA512 (yggdrasil-0.3.2.tar.gz) = e438627e5e7becbf95c059ab9b633806ee64087dd9e97f5a5ff693621bdb49704f868139fda60b86cb8556fe206a1eee32103aeecd20da5839d40c257ba8872a SHA512 (yggdrasil-0.3.2.tar.xz) = adb94e48091a4df00e2de8bddd02cd0964cf1753be85bbdc3b16ed0aef6fb530718393f4868ed2323df70163e455a5bc34e1f33432c72026ba8d5588573cb2e3

View File

@ -21,7 +21,7 @@ Summary: Remote data transmission and processing client
License: GPL-3.0-only License: GPL-3.0-only
URL: %{gourl} URL: %{gourl}
Source: %{gosource} Source: %{url}/releases/download/%{version}/yggdrasil-%{version}.tar.xz
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: meson BuildRequires: meson
@ -34,11 +34,13 @@ BuildRequires: pkgconfig(bash-completion)
%gopkg %gopkg
%prep %prep
%goprep %goprep %{?rhel:-k}
%autopatch -p1 %autopatch -p1
%if %{undefined rhel}
%generate_buildrequires %generate_buildrequires
%go_generate_buildrequires %go_generate_buildrequires
%endif
%build %build
%undefine _auto_set_build_flags %undefine _auto_set_build_flags
@ -59,6 +61,9 @@ export %gomodulesmode
%files %files
%license LICENSE %license LICENSE
%if %{defined rhel}
%license vendor/modules.txt
%endif
%doc CONTRIBUTING.md README.md %doc CONTRIBUTING.md README.md
%{_bindir}/* %{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}