Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TeleIRC is a Go implementation of a Telegram <=> IRC bridge. TeleIRC works with any IRC channel and Telegram group. It bridges messages between a Telegram group and an IRC channel. PR: 265916 Approved by: Jesús Daniel Colmenares Oviedo (maintainer)
- Loading branch information
1 parent
c73027b
commit 0543cb5
Showing
8 changed files
with
147 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
PORTNAME= teleirc | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 2.3.0 | ||
CATEGORIES= net-im | ||
|
||
MAINTAINER= DtxdF@disroot.org | ||
COMMENT= Telegram/IRC bridge for use with any IRC channel and Telegram group | ||
WWW= https://teleirc.com/ | ||
|
||
LICENSE= GPLv3 | ||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt | ||
|
||
USES= go:modules | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= ritlug | ||
|
||
GH_TUPLE= caarlos0:env:v6.0.0:caarlos0_env_v6/vendor/github.com/caarlos0/env/v6 \ | ||
davecgh:go-spew:v1.1.0:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ | ||
go-playground:assert:v1.2.1:go_playground_assert/vendor/gopkg.in/go-playground/assert.v1 \ | ||
go-playground:locales:v0.12.1:go_playground_locales/vendor/github.com/go-playground/locales \ | ||
go-playground:universal-translator:v0.16.0:go_playground_universal_translator/vendor/github.com/go-playground/universal-translator \ | ||
go-playground:validator:v9.29.1:go_playground_validator/vendor/github.com/go-playground/validator \ | ||
go-telegram-bot-api:telegram-bot-api:v4.6.4:go_telegram_bot_api_telegram_bot_api/vendor/github.com/go-telegram-bot-api/telegram-bot-api \ | ||
golang:mock:v1.4.3:golang_mock/vendor/github.com/golang/mock \ | ||
joho:godotenv:v1.3.0:joho_godotenv/vendor/github.com/joho/godotenv \ | ||
kyokomi:emoji:v2.1.0:kyokomi_emoji/vendor/github.com/kyokomi/emoji \ | ||
leodido:go-urn:v1.1.0:leodido_go_urn/vendor/github.com/leodido/go-urn \ | ||
lrstanley:girc:4fc93959e1a7:lrstanley_girc/vendor/github.com/lrstanley/girc \ | ||
pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ | ||
stretchr:testify:v1.3.0:stretchr_testify/vendor/github.com/stretchr/testify \ | ||
technoweenie:multipartstreamer:v1.0.1:technoweenie_multipartstreamer/vendor/github.com/technoweenie/multipartstreamer | ||
USE_RC_SUBR= teleirc | ||
|
||
GO_TARGET= ./cmd/teleirc.go:teleirc | ||
GO_BUILDFLAGS= -ldflags "-X main.version=${PORTVERSION}" | ||
|
||
USERS= teleirc | ||
GROUPS= teleirc | ||
|
||
PLIST_SUB= GROUP="${GROUPS:[0]}" \ | ||
USER="${USERS:[0]}" | ||
|
||
post-install: | ||
@${MKDIR} ${STAGEDIR}/${PREFIX}/etc | ||
@${CP} ${WRKSRC}/env.example ${STAGEDIR}/${PREFIX}/etc/teleirc.conf.sample | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
TIMESTAMP = 1677376208 | ||
SHA256 (ritlug-teleirc-v2.3.0_GH0.tar.gz) = 1fc695676d012083c6ce6f9b52718bd7139c9973197a76efccb283e38d704b1b | ||
SIZE (ritlug-teleirc-v2.3.0_GH0.tar.gz) = 371844 | ||
SHA256 (caarlos0-env-v6.0.0_GH0.tar.gz) = 1773dbb54a3734bda3c288050c8e37de50761855f1fccd785c37dc4d868182df | ||
SIZE (caarlos0-env-v6.0.0_GH0.tar.gz) = 11237 | ||
SHA256 (davecgh-go-spew-v1.1.0_GH0.tar.gz) = 1f7e0bd2db0341925b5f2ee5834e99380f4c2b1bd36cf0fa62d7717899d39d62 | ||
SIZE (davecgh-go-spew-v1.1.0_GH0.tar.gz) = 42337 | ||
SHA256 (go-playground-assert-v1.2.1_GH0.tar.gz) = 73c63ba9a0c07a1f0b8746a5c86705ca26ae11267d77a9babdd6d4073c1fa2ed | ||
SIZE (go-playground-assert-v1.2.1_GH0.tar.gz) = 4163 | ||
SHA256 (go-playground-locales-v0.12.1_GH0.tar.gz) = 03bc7bd40b953c01aa0be2f2d049f4cc83ba81d3aa4906298aebeb0fa3983ad0 | ||
SIZE (go-playground-locales-v0.12.1_GH0.tar.gz) = 4225114 | ||
SHA256 (go-playground-universal-translator-v0.16.0_GH0.tar.gz) = 478dfc8959c919d371d3218d8c5c380ef517e094a5e0990e23fdb6824b55158a | ||
SIZE (go-playground-universal-translator-v0.16.0_GH0.tar.gz) = 36036 | ||
SHA256 (go-playground-validator-v9.29.1_GH0.tar.gz) = 1b53988c7b0079869be75c2fd4acbb9d3e8c204751d620652329995878bb37b4 | ||
SIZE (go-playground-validator-v9.29.1_GH0.tar.gz) = 133468 | ||
SHA256 (go-telegram-bot-api-telegram-bot-api-v4.6.4_GH0.tar.gz) = bfdb23fda6da247305164d206c95532e1a0b0537a621ad337f74798852a81958 | ||
SIZE (go-telegram-bot-api-telegram-bot-api-v4.6.4_GH0.tar.gz) = 2076453 | ||
SHA256 (golang-mock-v1.4.3_GH0.tar.gz) = a5961e57823e449a7f1bd6c958628e4f5d167b7cd8b83b81c10b609f9f5591ce | ||
SIZE (golang-mock-v1.4.3_GH0.tar.gz) = 55835 | ||
SHA256 (joho-godotenv-v1.3.0_GH0.tar.gz) = 07beb0bae964dbe37442603a404196111dbbbaaa986fc179d5d5fdc46ed6a189 | ||
SIZE (joho-godotenv-v1.3.0_GH0.tar.gz) = 9941 | ||
SHA256 (kyokomi-emoji-v2.1.0_GH0.tar.gz) = ee2c17312cb796c7c54d1265a4fe3190c1a3c1defebcea614156420223120c8a | ||
SIZE (kyokomi-emoji-v2.1.0_GH0.tar.gz) = 60122 | ||
SHA256 (leodido-go-urn-v1.1.0_GH0.tar.gz) = a94e300521a1b6a1c86c0c5ad8778e8a71dd6a4dd965b63a14d8af107593e709 | ||
SIZE (leodido-go-urn-v1.1.0_GH0.tar.gz) = 9295 | ||
SHA256 (lrstanley-girc-4fc93959e1a7_GH0.tar.gz) = 2b688db043f780b8ac661ac165bd3a0da0cf80d4c5a5a4d92d171f9f6289006a | ||
SIZE (lrstanley-girc-4fc93959e1a7_GH0.tar.gz) = 67961 | ||
SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda | ||
SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398 | ||
SHA256 (stretchr-testify-v1.3.0_GH0.tar.gz) = 0cd9c199a72b8d80621624b37c0ed5ac724352d458506a31dfa86710551e7fc5 | ||
SIZE (stretchr-testify-v1.3.0_GH0.tar.gz) = 102859 | ||
SHA256 (technoweenie-multipartstreamer-v1.0.1_GH0.tar.gz) = 9247a9071eb90653e2b70efd6abd9bffbe7498b238c0f06d62d8b5096f7c31e6 | ||
SIZE (technoweenie-multipartstreamer-v1.0.1_GH0.tar.gz) = 3246 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
|
||
# PROVIDE: teleirc | ||
# REQUIRE: LOGIN | ||
# KEYWORD: shutdown | ||
# | ||
# Configuration settings for teleirc in /etc/rc.conf | ||
# | ||
# teleirc_enable (bool): Enable teleirc. (Default=NO) | ||
# teleirc_conf (str): Teleirc configuration file. (Default=%%PREFIX%%/etc/teleirc.conf) | ||
# teleirc_flags (str): Flags used for teleirc. (Default=-conf ${teleirc_conf}) | ||
# teleirc_logfile (str): Log file used for teleirc. (Default=/var/log/teleirc.log) | ||
# teleirc_program (str): Path to teleirc application. (Default=%%PREFIX%%/bin/teleirc) | ||
# teleirc_username (str): User to run teleirc as. (Default=teleirc) | ||
# teleirc_restart_delay_seconds (int): Supervise and restart teleirc after the specified delay if it | ||
# has been terminated. (Default=30) | ||
|
||
. /etc/rc.subr | ||
|
||
name="teleirc" | ||
desc="Bridge between IRC and Telegram" | ||
rcvar="teleirc_enable" | ||
start_cmd="teleirc_start" | ||
restart_cmd="teleirc_restart" | ||
procname=/usr/sbin/daemon | ||
|
||
load_rc_config $name | ||
|
||
: ${teleirc_enable:=NO} | ||
: ${teleirc_conf:=%%PREFIX%%/etc/teleirc.conf} | ||
: ${teleirc_flags=-conf "${teleirc_conf}"} | ||
: ${teleirc_logfile:=/var/log/teleirc.log} | ||
: ${teleirc_program:=%%PREFIX%%/bin/teleirc} | ||
: ${teleirc_username:=teleirc} | ||
: ${teleirc_restart_delay_seconds:=30} | ||
: ${teleirc_pidfile:=/var/run/teleirc.pid} | ||
|
||
pidfile="${teleirc_pidfile}" | ||
|
||
teleirc_start() | ||
{ | ||
echo "Starting ${name}." && sleep 1 | ||
${procname} \ | ||
-t "${desc}" \ | ||
-R "${teleirc_restart_delay_seconds}" \ | ||
-u "${teleirc_username}" \ | ||
-o "${teleirc_logfile}" \ | ||
-P "${pidfile}" \ | ||
${teleirc_program} ${teleirc_flags} | ||
} | ||
|
||
teleirc_restart() | ||
{ | ||
run_rc_command stop && | ||
run_rc_command start | ||
} | ||
|
||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TeleIRC is a Go implementation of a Telegram <=> IRC bridge. TeleIRC | ||
works with any IRC channel and Telegram group. It bridges messages | ||
between a Telegram group and an IRC channel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin/teleirc | ||
@sample(%%USER%%,%%GROUP%%,0640) etc/teleirc.conf.sample etc/teleirc.conf |