aboutsummaryrefslogtreecommitdiffstats
path: root/www-servers/caddy-bin/caddy-bin-1.0.4.ebuild
blob: 158b331cdf11537e04ea1dbc6e250a04a4e7626a (plain) (blame)
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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit user fcaps

DESCRIPTION="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
HOMEPAGE="https://github.com/mholt/caddy"

SRC_URI="https://github.com/caddyserver/caddy/releases/download/v${PV}/caddy_v${PV}_linux_amd64.tar.gz"
KEYWORDS="amd64"

LICENSE="Apache-2.0"
SLOT="0"
IUSE=""

RDEPEND="!www-servers/caddy"

FILECAPS=( cap_net_bind_service+ep /usr/bin/caddy )

RESTRICT="test mirror"

S="${WORKDIR}"

pkg_setup() {
	enewgroup http
	enewuser caddy -1 -1 /var/lib/caddy http
}

src_install() {
	dobin caddy

	newinitd "${FILESDIR}"/caddy.initd caddy
	newconfd "${FILESDIR}"/caddy.confd caddy

	diropts -o caddy -g root -m 750 /var/lib/caddy
}