From 69d4576154348e8c63159c9c2bc0bedb7c1b9386 Mon Sep 17 00:00:00 2001 From: webbuilder_pel7ppc64lebuilder0 Date: Tue, 21 Apr 2020 11:24:46 +0200 Subject: [PATCH] hugo update version 0.69.0 add extended Signed-off-by: webbuilder_pel7ppc64lebuilder0 --- SPECS/hugo.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SPECS/hugo.spec b/SPECS/hugo.spec index c0c7d72..59b07ca 100644 --- a/SPECS/hugo.spec +++ b/SPECS/hugo.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name : hugo -Version : 0.64.1 +Version : 0.69.0 Release : 1%{?dist} Summary : The world’s fastest framework for building websites. Group : System/Web @@ -31,19 +31,24 @@ go mod download %build export GOPATH=`pwd`/go +export GO111MODULE=on cd src/hugo git checkout tags/v%{version} -go build -ldflags '-extldflags -s -w -buildid %{version}' -#go install -ldflags '-extldflags -s -w' +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 +HUGO_BUILD_TAGS='extended' 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-extended %install install -p -D -m 0555 src/hugo/hugo %{buildroot}%{_bindir}/hugo +install -p -D -m 0555 src/hugo/hugo-extended %{buildroot}%{_bindir}/hugo-extended %files %doc %{_bindir}/hugo +%{_bindir}/hugo-extended %changelog