From 50253eb26bce50f5fb79eabef44251884bdd9ae0 Mon Sep 17 00:00:00 2001 From: webbuilder_pel7ppc64bebuilder0 Date: Mon, 9 Nov 2020 10:14:51 +0100 Subject: [PATCH] hugo enable ppc64 build Signed-off-by: webbuilder_pel7ppc64bebuilder0 --- SPECS/hugo.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SPECS/hugo.spec b/SPECS/hugo.spec index 99b703d..f5cca3e 100644 --- a/SPECS/hugo.spec +++ b/SPECS/hugo.spec @@ -37,8 +37,13 @@ git checkout tags/v%{version} export SHORTCOMMIT=$(git rev-parse --short HEAD) export BUILDDATE=$(date +%Y%m%d) go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/gohugoio/hugo/common/hugo.buildDate="$BUILDDATE"' -X 'github.com/gohugoio/hugo/common/hugo.commitHash="$SHORTCOMMIT"'" -o hugo +%ifarch ppc64 +export CGO_ENABLED=1 +%endif go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/gohugoio/hugo/common/hugo.buildDate="$BUILDDATE"' -X 'github.com/gohugoio/hugo/common/hugo.commitHash="$SHORTCOMMIT"'" -tags "extended" -o hugo-extended - +%ifarch ppc64 +unset CGO_ENABLED +%endif %install install -p -D -m 0555 src/hugo/hugo %{buildroot}%{_bindir}/hugo