Use %gomkdir because it's available in RHEL 9
There's no need to do a build just for this. Resolves: #2165742
This commit is contained in:
parent
6de1fe7c46
commit
ccb07d1722
18
toolbox.spec
18
toolbox.spec
@ -79,27 +79,13 @@ The %{name}-tests package contains system tests for %{name}.
|
|||||||
|
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
|
|
||||||
# %%gomkdir is absent from RHEL 8.
|
%gomkdir -s %{_builddir}/%{extractdir}/src %{?rhel:-k}
|
||||||
GOBUILDDIR="$(pwd)/_build"
|
|
||||||
GOSOURCEDIR="$(pwd)"
|
|
||||||
if [[ ! -e "$GOBUILDDIR/bin" ]] ; then
|
|
||||||
install -m 0755 -vd "$GOBUILDDIR/bin"
|
|
||||||
fi
|
|
||||||
if [[ ! -e "$GOBUILDDIR/src/%{goipath}" ]] ; then
|
|
||||||
install -m 0755 -vd "$(dirname $GOBUILDDIR/src/%{goipath})"
|
|
||||||
ln -fs "$GOSOURCEDIR" "$GOBUILDDIR/src/%{goipath}"
|
|
||||||
fi
|
|
||||||
cd "$GOBUILDDIR/src/%{goipath}"
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export %{gomodulesmode}
|
export %{gomodulesmode}
|
||||||
GOBUILDDIR="$(pwd)/_build"
|
export GOPATH=%{gobuilddir}:%{gopath}
|
||||||
export GOPATH="$GOBUILDDIR:%{gopath}"
|
|
||||||
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
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
|
|
||||||
ln -s src/vendor vendor
|
|
||||||
|
|
||||||
%meson \
|
%meson \
|
||||||
-Dmigration_path_for_coreos_toolbox=true \
|
-Dmigration_path_for_coreos_toolbox=true \
|
||||||
|
Loading…
Reference in New Issue
Block a user