# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit rpm DESCRIPTION="Puppet Webhook API server written in Go." HOMEPAGE="https://github.com/voxpupuli/webhook-go" SRC_URI="amd64? ( https://github.com/voxpupuli/${PN}/releases/download/v${PV}/${PN}_${PV}_linux_amd64.rpm ) arm64? ( https://github.com/voxpupuli/${PN}/releases/download/v${PV}/${PN}_${PV}_linux_arm64.rpm )" S="${WORKDIR}" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 ~arm64" BDEPEND="app-arch/libarchive" src_unpack() { cd "${WORKDIR}" || die bsdtar -xf "${DISTDIR}/${A}" --no-same-owner || die "Failed to unpack ${A}" } src_install() { cp -a "${S}/"* "${D}/" || die "Install failed!" newinitd "${FILESDIR}/webhook-go.initd" webhook-go newconfd "${FILESDIR}/webhook-go.confd" webhook-go }