Simplify and unify the build with RHEL

There's no need to do a build just for this.
This commit is contained in:
Debarshi Ray 2023-02-23 15:22:14 +01:00
parent 7556bb66c2
commit cbcdb7a21c

View File

@ -169,18 +169,14 @@ The %{name}-tests package contains system tests for %{name}.
%patch103 -p1
%endif
%gomkdir
%gomkdir -s %{_builddir}/%{extractdir}/src %{?rhel:-k}
%build
export %{gomodulesmode}
export GOPATH=%{gobuilddir}:%{gopath}
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
ln -s src/cmd cmd
ln -s src/pkg pkg
%if 0%{?rhel}
ln -s src/vendor vendor
%endif
%meson -Dprofile_dir=%{_sysconfdir}/profile.d -Dtmpfiles_dir=%{_tmpfilesdir}
%meson_build