aboutsummaryrefslogtreecommitdiffstats
path: root/community/lego/APKBUILD
blob: c5004736950b6bd5db68fae62d0a4a9c2051ebee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=lego
pkgver=3.1.0
pkgrel=0
pkgdesc="Let's Encrypt client and ACME library written in Go"
url="https://github.com/go-acme/lego"
arch="all"
license="MIT"
depends="ca-certificates"
makedepends="go libcap"
source="$pkgname-$pkgver.tar.gz::https://github.com/go-acme/lego/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

export GOPATH="$srcdir"
export CGO_ENABLED=0

build() {
	go build -v -ldflags "-X main.version=$pkgver" -o ./bin/lego ./cmd/lego
}

package() {
	install -Dm755 ./bin/lego "$pkgdir"/usr/bin/lego
	setcap cap_net_bind_service=+ep "$pkgdir"/usr/bin/lego
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

check() {
	go test -v -cover ./...
}

sha512sums="f4d567d665181441ab63499807a20a826526136c1066f4d99fb0b7bddd0275680f8492629a5226df6bf24cfb398c55ead114cb2948522c8101046243f53e3b7a  lego-3.1.0.tar.gz"