void-packages/srcpkgs/caddy/template

39 lines
989 B
Bash

# Template file for 'caddy'
pkgname=caddy
version=2.7.6
revision=1
build_style=go
go_import_path=github.com/caddyserver/caddy/v2
go_package="${go_import_path}/cmd/caddy"
hostmakedepends="go1.20"
depends="shared-mime-info"
short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://caddyserver.com"
changelog="https://github.com/caddyserver/caddy/releases"
distfiles="https://github.com/caddyserver/caddy/archive/v${version}.tar.gz"
checksum=e1c524fc4f4bd2b0d39df51679d9d065bb811e381b7e4e51466ba39a0083e3ed
system_accounts="caddy"
caddy_homedir="/var/lib/caddy"
caddy_descr="caddy daemon"
conf_files="/etc/caddy/Caddyfile"
export GOTOOLCHAIN=go1.20
make_dirs="
/etc/caddy 0700 caddy caddy
/var/lib/caddy 0700 caddy caddy"
post_patch() {
vsed -e "s,unknown,${version},g" -i ${wrksrc}/caddy.go
}
post_install() {
vsv caddy
printf "\n" > Caddyfile
vinstall Caddyfile 600 etc/caddy
}