aboutsummaryrefslogtreecommitdiffstats
path: root/community/lego/APKBUILD
blob: bdd860a350ded32050e85f4d10bbc1cfc8339075 (plain) (blame)
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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=lego
pkgver=3.3.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"

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="7a0d2ed89437a631fbdc7913b1971a8c06289f2197e8ff8f8969ca10f93ff014bf164982b335dd0a3943e31ccd2699fb13b059ccaee12239b28acddbb5ee3aa1  lego-3.3.0.tar.gz"