From 7c22aac08721cfc30bd2dd7c34f6aac9aefb5cf4 Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Thu, 28 Nov 2024 18:34:52 +0300 Subject: [PATCH] add net-im/teleirc --- acct-group/teleirc/teleirc-0.ebuild | 8 ++++++ acct-user/teleirc/teleirc-0.ebuild | 11 ++++++++ net-im/teleirc/Manifest | 2 ++ net-im/teleirc/teleirc-2.3.0.ebuild | 42 +++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 acct-group/teleirc/teleirc-0.ebuild create mode 100644 acct-user/teleirc/teleirc-0.ebuild create mode 100644 net-im/teleirc/Manifest create mode 100644 net-im/teleirc/teleirc-2.3.0.ebuild diff --git a/acct-group/teleirc/teleirc-0.ebuild b/acct-group/teleirc/teleirc-0.ebuild new file mode 100644 index 0000000..1f32da1 --- /dev/null +++ b/acct-group/teleirc/teleirc-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-group + +ACCT_GROUP_ID=-1 diff --git a/acct-user/teleirc/teleirc-0.ebuild b/acct-user/teleirc/teleirc-0.ebuild new file mode 100644 index 0000000..6267bdd --- /dev/null +++ b/acct-user/teleirc/teleirc-0.ebuild @@ -0,0 +1,11 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-user + +ACCT_USER_ID=-1 +ACCT_USER_GROUPS=( ${PN} ) + +acct-user_add_deps diff --git a/net-im/teleirc/Manifest b/net-im/teleirc/Manifest new file mode 100644 index 0000000..701394d --- /dev/null +++ b/net-im/teleirc/Manifest @@ -0,0 +1,2 @@ +DIST teleirc-2.3.0-vendor.tar.xz 253396 BLAKE2B 946f1693884981c0431c8dea015cfaa05979c3b7194021460cd5543fb8b183ee8c01c622b15afb4f6ddf7d8ffb0b2af09d1dc8d4c473421df1be9f6e8c654c73 SHA512 22a2d90a18df963166a7e1f8e954fb34ce58f6a8c6ca078042214e9b19477af1774cd3f165c4eb3c3d94842156ac0f747b210a1644fc6a5c3223b14511fe44b3 +DIST teleirc-2.3.0.tar.gz 371844 BLAKE2B 24f36333b13f34bc7e77781c20b5f64e61a65cab710b42545339509704caa446c1166e020c594e68617770467066360070818fae00984c451e71287a57cdbcaf SHA512 2c65f631160ca48424a211dccaa752263e8c3b7fd0e9f370a4c4c192b7c6181fc5352769a15cdd00d90aae4b4063503900c969fc0dc2dbe82cc9eeb625143148 diff --git a/net-im/teleirc/teleirc-2.3.0.ebuild b/net-im/teleirc/teleirc-2.3.0.ebuild new file mode 100644 index 0000000..cad2de9 --- /dev/null +++ b/net-im/teleirc/teleirc-2.3.0.ebuild @@ -0,0 +1,42 @@ +# 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() { + default + + sed -i "s@/usr/local/bin/@/usr/bin/@" deployments/systemd/teleirc@.service || die +} + +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 +}