diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2016-05-11 09:32:42 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-05-11 09:32:46 +0200 |
commit | 031b2cc161f2e45637fca0d2a7823d4db6c6aa37 (patch) | |
tree | d15b841fc5a3920a9846fdbcc0413448f33370da /testing/lego | |
parent | e9c8d91f78ba19c16b800e0dae0f48d9bd615dc8 (diff) | |
download | aports-031b2cc161f2e45637fca0d2a7823d4db6c6aa37.tar.bz2 aports-031b2cc161f2e45637fca0d2a7823d4db6c6aa37.tar.xz |
testing/lego: new aport
Diffstat (limited to 'testing/lego')
-rw-r--r-- | testing/lego/APKBUILD | 61 | ||||
-rw-r--r-- | testing/lego/use-correct-version.patch | 11 |
2 files changed, 72 insertions, 0 deletions
diff --git a/testing/lego/APKBUILD b/testing/lego/APKBUILD new file mode 100644 index 0000000000..e97b822a1e --- /dev/null +++ b/testing/lego/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Carlo Landmeter <clandmeter@gmail.com> +pkgname=lego +pkgver=0.3.1 +pkgrel=0 +pkgdesc="Let's Encrypt client and ACME library written in Go" +url="https://github.com/xenolf/lego" +arch="all" +license="MIT" +depends="ca-certificates" +depends_dev="" +makedepends="$depends_dev go git libcap" +subpackages="" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + use-correct-version.patch + " + +_disturl="dev.alpinelinux.org:/archive/$pkgname/" +_gourl="github.com/xenolf/lego" + +builddir="$srcdir"/src/$_gourl + +snapshot() { + abuild clean && abuild deps + export GOPATH="$srcdir" + msg "Checking out v${pkgver} tag" + # go get will not checkout a specific tag + # so we run our own git checkout branch + git clone --quiet --branch v${pkgver} \ + https://$_gourl $builddir || return 1 + cd $builddir + # fetch deps + go get -v -d || return 1 + cd "$srcdir" + tar zcf $pkgname-$pkgver.tar.gz src || return 1 + rsync --progress -La $pkgname-$pkgver.tar.gz \ + $_disturl || return 1 + cd $startdir && abuild undeps +} + +build() { + cd "$builddir" || return 1 + export GOPATH="$srcdir" + go build -v -o e${pkgname} || return 1 +} + +package() { + cd "$builddir" + install -Dm755 e${pkgname} \ + "$pkgdir"/usr/bin/lego || return 1 + # allow non root to use priv ports + setcap cap_net_bind_service=+ep \ + "$pkgdir"/usr/bin/lego || return 1 +} + +md5sums="15bdbe7c9a24d1119e16fa7eb2474812 lego-0.3.1.tar.gz +360a5fc558fd26617f85ebda7a19ebdd use-correct-version.patch" +sha256sums="b44914ec72e660a741c4eacaf74a3f00552e43cdbc266ad9e9edd6ee68b93d02 lego-0.3.1.tar.gz +1a4be6a44647648e045a4ff1fe91de8e8a7fc0d9acee890ae032a9e0477f25f8 use-correct-version.patch" +sha512sums="4f3a87b0846406f1d9c04b017dd822eb6e0eb11762f2d20b1fbbce897229fa434f47fbac90e1949d6431cd2827fa1b9f8d9f2d8e94b7c3a645f49d82384e8fbc lego-0.3.1.tar.gz +0c48d76a504ce6f4dab496a317f2b273203d761539b217c8c666d956b9855f94f8645654f7e7a84ccbe6c4d24d1b9c96ff2e93e459f36927866025ce9037a5b4 use-correct-version.patch" diff --git a/testing/lego/use-correct-version.patch b/testing/lego/use-correct-version.patch new file mode 100644 index 0000000000..5dae0fd875 --- /dev/null +++ b/testing/lego/use-correct-version.patch @@ -0,0 +1,11 @@ +--- ./cli.go.orig ++++ ./cli.go +@@ -32,7 +32,7 @@ + app.Name = "lego" + app.Usage = "Let's Encrypt client written in Go" + +- version := "0.3.0" ++ version := "0.3.1" + if strings.HasPrefix(gittag, "v") { + version = gittag + } |