blob: 2daeefb3e54d74e8783784548f88d028914846df (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=caddy
# 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"
url="https://caddyserver.com/"
arch="all"
license="ASL 2.0"
depends="ca-certificates"
makedepends="go libcap bash glide"
install="$pkgname.pre-install"
pkgusers="$pkgname"
pkggroups="$pkgname"
source="$pkgname-$pkgver.tar.gz::https://github.com/mholt/caddy/archive/v${pkgver}.tar.gz
$pkgname.initd
$pkgname.confd
$pkgname.conf
glide.yaml
glide.lock
"
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
}
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
}
glide_init() {
export GOPATH="$startdir"
echo "GOPATH=$startdir"
abuild clean deps unpack prepare
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
}
md5sums="793baba3bb1b524916f1a566554e4b2a caddy-0.9.0.tar.gz
8217cae6d4621dc942b15dad6a364e6a caddy.initd
b5f1f62ac7d59b722bdebdcc9d2a6af5 caddy.confd
82217943769d0761c24e333e9fd51f1f caddy.conf
4356ece4c7eb3d38f212941343362e2c glide.yaml
ebb974a594cb861e0d6ac31bc0d33a24 glide.lock"
sha256sums="ded8400281d5c7e3ab7765d3ee89740212e9d2b1323e111ef88f4fffc7e074b2 caddy-0.9.0.tar.gz
c9070cce0b57cef69894f05841b1eb7eca33cf9b50af71c15e57ebf17a40af2c caddy.initd
61a23e879e2aa9743f631fc54a62b9c23a1944606194b9dbbbcf3f563a8998c1 caddy.confd
08065486d87a9922464b3ae033343db27eca86d790cc0233dbb9b6666641db98 caddy.conf
9a2931210a42e5575510be6eacca0adaedb926c83936210f7ca770e6fffa8c87 glide.yaml
99f0ec6e97a59ee41186f6107206fb3d58b99f1015f0e51cf32ab9c14be58a0c glide.lock"
sha512sums="fa90fe4b8803f2c94e0121b5e2d5cf2e4f38f2fd4a3732d520d105f0d36108a7c7e6acd4b520e50942e351e7a63d921fc0c62763b0c0317ef1adcb41c32f5609 caddy-0.9.0.tar.gz
00fe095efd8d801f0c2c69832c7240858080407ea3696ca07f6b53d3304f7e2784566d8a6b447cb83d7dc4542db551f1b4fa48ff031da7e4a1d4a26e59fc05c5 caddy.initd
7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c caddy.confd
c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75 caddy.conf
597e38684bff1f8fe13d4127881d9723cb5404130e08092f6bc6b747ea7590b86291fa844f4b154e8e8126d4e92fb85ad5fdc0a3ca340c20b76cd219227b104f glide.yaml
0c8bd5baf27689890ac606a85650a4b2640765b1b180b5091d03c393d5a174cccd44f84e0e83ff0fbf432f72691edd4d35ebf66e7ac06ac95239d4c4c9cd7344 glide.lock"
|