41 lines
1,015 B
Text
41 lines
1,015 B
Text
|
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
||
|
# Contributor: Fernandez Ludovic <lfernandez dot dev at gmail dot com>
|
||
|
|
||
|
pkgname=lego
|
||
|
pkgver=4.4.0
|
||
|
pkgrel=1
|
||
|
pkgdesc='Lets Encrypt client and ACME library'
|
||
|
url='https://go-acme.github.io/lego/'
|
||
|
arch=('x86_64')
|
||
|
license=('MIT')
|
||
|
depends=(glibc)
|
||
|
makedepends=(go git)
|
||
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/go-acme/lego/archive/v$pkgver.tar.gz")
|
||
|
sha512sums=('a8fc84ae2caee4966691092d1f379eb901c67cef3ca968ba78e1628cab3df02f0fc9b345c33121a6437a9d1495356929faf946920bd9a9e33d58975481330ce2')
|
||
|
|
||
|
prepare() {
|
||
|
cd $pkgname-$pkgver
|
||
|
|
||
|
go mod vendor
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
cd $pkgname-$pkgver/cmd/lego
|
||
|
go build -v \
|
||
|
-buildmode=pie \
|
||
|
-trimpath \
|
||
|
-mod=vendor \
|
||
|
-modcacherw \
|
||
|
-ldflags "-extldflags $LDFLAGS -X "main.version=v${pkgver}""
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
cd $pkgname-$pkgver
|
||
|
|
||
|
# binary
|
||
|
install -Dm755 "cmd/lego/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||
|
|
||
|
# license
|
||
|
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||
|
}
|