aboutsummaryrefslogtreecommitdiffstats
path: root/community/caddy
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-01 12:25:22 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-08-01 13:26:29 +0200
commit430baceb24d37e07628a1b42e0e9592af2095e54 (patch)
treeea0412188146490f96509956f2dee9d765031a52 /community/caddy
parentf7ff9adbfd8eab6f23f6523bc5847bfc51766cca (diff)
downloadaports-430baceb24d37e07628a1b42e0e9592af2095e54.tar.bz2
aports-430baceb24d37e07628a1b42e0e9592af2095e54.tar.xz
community/caddy: improve abuild, fix mixed tabs & spaces etc.
Diffstat (limited to 'community/caddy')
-rw-r--r--community/caddy/APKBUILD55
1 files changed, 32 insertions, 23 deletions
diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index fad46fa379..2daeefb3e5 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=caddy
-# when updating pkgver dont forget to run glide_init
+# When updating pkgver don't forget to run glide_init.
pkgver=0.9.0
pkgrel=0
pkgdesc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
@@ -9,10 +9,8 @@ url="https://caddyserver.com/"
arch="all"
license="ASL 2.0"
depends="ca-certificates"
-depends_dev=""
-makedepends="$depends_dev go libcap bash glide"
+makedepends="go libcap bash glide"
install="$pkgname.pre-install"
-subpackages=""
pkgusers="$pkgname"
pkggroups="$pkgname"
source="$pkgname-$pkgver.tar.gz::https://github.com/mholt/caddy/archive/v${pkgver}.tar.gz
@@ -22,46 +20,57 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/mholt/caddy/archive/v${pkgve
glide.yaml
glide.lock
"
-builddir="$srcdir"/caddy-$pkgver
+builddir="$srcdir/caddy-$pkgver"
build() {
export GOPATH="$startdir"
- cd "$builddir" || return 1
- cp "$srcdir"/glide.yaml "$srcdir"/glide.lock .
- glide install --skip-test || return 1
- go fix || return 1
- cd caddy
- ./build.bash || return 1
+
+ cd "$builddir" || return 1
+
+ cp "$srcdir"/glide.yaml "$srcdir"/glide.lock .
+ glide install --skip-test || return 1
+ go fix || return 1
+
+ cd caddy && ./build.bash || return 1
}
package() {
cd "$builddir"
+
install -Dm755 caddy/caddy "$pkgdir"/usr/sbin/caddy || return 1
+
# caddy currently does not support dropping privileges so we
# change attributes with setcat to allow access to priv ports
# https://caddyserver.com/docs/faq
setcap cap_net_bind_service=+ep \
"$pkgdir"/usr/sbin/caddy || return 1
- install -d -o caddy -g caddy $pkgdir/var/lib/caddy \
- $pkgdir/etc/caddy $pkgdir/var/www || return 1
- install -Dm755 $srcdir/$pkgname.initd \
- $pkgdir/etc/init.d/$pkgname || return 1
- install -Dm644 $srcdir/$pkgname.confd \
- $pkgdir/etc/conf.d/$pkgname || return 1
- install -Dm644 $srcdir/$pkgname.conf \
- $pkgdir/etc/$pkgname/$pkgname.conf || return 1
+
+ install -d -o caddy -g caddy \
+ "$pkgdir"/var/lib/caddy \
+ "$pkgdir"/etc/caddy \
+ "$pkgdir"/var/www || return 1
+
+ install -Dm755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -Dm644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -Dm644 "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1
}
glide_init() {
- echo $startdir
export GOPATH="$startdir"
+ echo "GOPATH=$startdir"
+
abuild clean deps unpack prepare
- cd $builddir
+
+ cd "$builddir"
rm -f glide.yaml glide.lock
glide init --non-interactive || return 1
glide update || return 1
- cp glide.yaml glide.lock $startdir
- cd $startdir && abuild checksum clean
+ cp glide.yaml glide.lock "$startdir"
+
+ cd "$startdir" && abuild checksum clean
}
md5sums="793baba3bb1b524916f1a566554e4b2a caddy-0.9.0.tar.gz