2024-11-28 18:34:52 +03:00
|
|
|
# Copyright 2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit go-module systemd
|
|
|
|
|
|
|
|
DESCRIPTION="Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group"
|
|
|
|
HOMEPAGE="https://github.com/RITlug/teleirc"
|
|
|
|
SRC_URI="https://github.com/RITlug/${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="GPL-3.0"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
|
|
|
|
DEPEND=""
|
|
|
|
RDEPEND="${DEPEND}
|
|
|
|
acct-user/teleirc"
|
|
|
|
BDEPEND=""
|
|
|
|
|
|
|
|
src_prepare() {
|
2024-11-28 19:32:59 +03:00
|
|
|
local PATCHES=(
|
|
|
|
# meh, genpatches have no directory
|
|
|
|
"${FILESDIR}"/*.patch
|
|
|
|
)
|
|
|
|
default
|
2024-11-28 18:34:52 +03:00
|
|
|
|
2024-11-28 19:32:59 +03:00
|
|
|
sed -i "s@/usr/local/bin/@/usr/bin/@" deployments/systemd/teleirc@.service || die
|
2024-11-28 18:34:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
ego build -asmflags -trimpath \
|
|
|
|
-ldflags "-s -w -X main.version=${PV}" cmd/teleirc.go || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
systemd_dounit deployments/systemd/teleirc@.service
|
|
|
|
|
|
|
|
insinto /etc/"${PN}"
|
|
|
|
newins env.example example
|
|
|
|
|
|
|
|
dobin ${PN}
|
|
|
|
|
|
|
|
default
|
|
|
|
}
|