Subject: [alpine-aports] [PATCH] community/caddy: upgrade to 0.11.1

From: Carlo Landmeter <[email-masked]>
Date: Wed, 5 Dec 2018 10:37:57 +0000

---
 community/caddy/APKBUILD | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index 460d46f049..8ab0b608b8 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -1,7 +1,7 @@
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer: Carlo Landmeter <[email-masked]>
 pkgname=caddy
-pkgver=0.10.14
+pkgver=0.11.1
 pkgrel=0
 pkgdesc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 url="https://caddyserver.com/"
@@ -9,6 +9,8 @@ arch="all !s390x"
 license="Apache-2.0"
 depends="ca-certificates"
 makedepends="go libcap bash"
+subpackages="$pkgname-openrc"
+options="!check" # tests fail
 install="$pkgname.pre-install"
 pkgusers="$pkgname"
 pkggroups="$pkgname"
@@ -20,27 +22,30 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/mholt/$pkgname/archive/v$pkg
 builddir="$srcdir/src/github.com/mholt/$pkgname"
 
 prepare() {
-        mkdir -p ${builddir%/*}
-        mv "$srcdir"/$pkgname-$pkgver "$builddir"/
-        cd "$builddir"
-        default_prepare
+	mkdir -p ${builddir%/*}
+	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
+	cd "$builddir"
+	default_prepare
 }
 
 build() {
-        cd "$builddir"/caddy
-        export GOPATH="$srcdir"
-	go build -v -o caddy -ldflags \
-		"-X github.com/mholt/caddy/caddy/caddymain.gitTag=$pkgver"
+	cd "$builddir"
+	export GOPATH="$srcdir"
+	go build -v -o bin/caddy -ldflags \
+		"-X github.com/mholt/caddy/caddy/caddymain.gitTag=$pkgver" \
+		./caddy
 }
 
 check() {
-	"$builddir"/caddy/caddy -version > /dev/null
+	cd "$builddir"
+	export GOPATH="$srcdir"
+	go test ./...
 }
 
 package() {
 	cd "$builddir"
 
-	install -Dm755 caddy/caddy "$pkgdir"/usr/sbin/caddy
+	install -Dm755 bin/caddy "$pkgdir"/usr/sbin/caddy
 
 	# caddy currently does not support dropping privileges so we
 	# change attributes with setcat to allow access to priv ports
@@ -61,7 +66,7 @@ package() {
 		"$pkgdir"/etc/$pkgname/$pkgname.conf
 }
 
-sha512sums="b2d7ff08687c1b1331c018430e3458d4a5e4d5923803fabe563536ce372209ac0350efd4112a1099bfbfb517935d4f498613820d6b0685d5947a903227e15636  caddy-0.10.14.tar.gz
+sha512sums="a87b3926f22ef942fe341171aeda4967991d22475b6c38556de14301072798e2de78d12fca814044f94d0c5447b8dc9d60d6c412b8e6d6c059c3353431740571  caddy-0.11.1.tar.gz
 00fe095efd8d801f0c2c69832c7240858080407ea3696ca07f6b53d3304f7e2784566d8a6b447cb83d7dc4542db551f1b4fa48ff031da7e4a1d4a26e59fc05c5  caddy.initd
 7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c  caddy.confd
 c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75  caddy.conf"
-- 
2.19.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---