gentoo-overlay/net-im/watgbridge/watgbridge-1.11.0.ebuild

40 lines
875 B
Bash
Raw Permalink Normal View History

2024-11-28 16:33:35 +03:00
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="A forwarder from WhatsApp to Telegram"
HOMEPAGE="https://github.com/akshettrj/watgbridge"
SRC_URI="https://github.com/akshettrj/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://git.millerson.name/alex/gentoo-artifacts/releases/download/${P}-vendor/${P}-vendor.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
src_prepare() {
sed -i "s@^ExecStart=.*@ExecStart=/usr/bin/${PN}@g" watgbridge.service.sample || die
sed -i "s@^User=.*@User=nobody@g" watgbridge.service.sample
}
src_compile() {
ego build || die
}
src_install() {
dobin ${PN}
systemd_newunit watgbridge.service.sample watgbridge.service
insinto /etc
newins sample_config.yaml ${PN}.yaml
default
}