Updated with go package guidelines

This commit is contained in:
Morten Linderud 2020-07-05 14:17:45 +00:00
parent f64794a1c9
commit 7c6a72bedc

View File

@ -9,13 +9,13 @@ pkgname=caddy
pkgver=1.0.5
_gitcommit=11ae1aa6b88e45b077dd97cb816fe06cd91cca67
_distcommit=9e93bfd85c97d71ab842a4a4b555d358295c914e
pkgrel=1
pkgrel=2
pkgdesc='HTTP/2 Web Server with Automatic HTTPS'
url='https://caddyserver.com'
arch=('x86_64')
license=('Apache')
depends=('glibc')
makedepends=('go-pie' 'git')
makedepends=('go' 'git')
backup=('etc/caddy/caddy.conf')
source=("git+https://github.com/caddyserver/caddy#commit=${_gitcommit}?signed"
caddy-${_distcommit}-index.html::https://raw.githubusercontent.com/caddyserver/dist/${_distcommit}/welcome/index.html
@ -65,10 +65,12 @@ EOF
build() {
cd ${pkgname}/caddy
go build -v \
-trimpath \
-ldflags "-extldflags ${LDFLAGS}" \
.
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
go build -v .
}
package() {