portage/dev-go/xcaddy/xcaddy-9999.ebuild
Sam Therapy 8fd0d52984
dev-go/xcaddy: Fix mistake
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-11-09 22:53:42 +01:00

35 lines
755 B
Bash

# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module
DESCRIPTION="Build Caddy with plugins"
HOMEPAGE="https://github.com/caddyserver/xcaddy"
LICENSE="MIT Apache-2.0"
SLOT="0"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/caddyserver/xcaddy.git"
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
else
SRC_URI="https://github.com/caddyserver/xcaddy/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/api/packages/packaging/generic/portage/deps/${P}-vendor.tar.xz"
KEYWORDS="~amd64 ~arm64 ~x86"
fi
src_compile() {
ego build -ldflags "-s -w" ./cmd/xcaddy
}
src_install() {
dobin ./${PN}
einstalldocs
}