[packages/caddy] builds without go get

glen glen at pld-linux.org
Tue Sep 5 06:07:49 CEST 2017


commit 31703cf4f4bd42139b7e524855e39f8f1adc51a7
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Sep 5 07:07:35 2017 +0300

    builds without go get
    
    the vendor is bundled in git repo

 caddy.spec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/caddy.spec b/caddy.spec
index faf3388..aca26f3 100644
--- a/caddy.spec
+++ b/caddy.spec
@@ -1,5 +1,4 @@
 # TODO
-# - make it build without "go get"
 # - initscripts https://github.com/mholt/caddy/tree/master/dist/init
 #
 # Conditional build:
@@ -37,6 +36,10 @@ cryptographic assets for you.
 %setup -q
 
 GOPATH=$(pwd)/vendor
+set -- $GOPATH/*
+install -d $GOPATH/src
+mv "$@" vendor/src
+
 install -d $GOPATH/src/github.com/mholt
 ln -s ../../../.. $GOPATH/src/github.com/mholt/caddy
 
@@ -47,7 +50,6 @@ export GOPATH=$(pwd)/vendor
 # however only gitTag is relevant for release build
 LDFLAGS="-X main.gitTag=v%{version}"
 
-test -d vendor/src/golang.org || go get ./... || :
 %gobuild -o caddy.bin
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/caddy.git/commitdiff/31703cf4f4bd42139b7e524855e39f8f1adc51a7



More information about the pld-cvs-commit mailing list