FreeBSD Bugzilla – Attachment 235977 Details for
Bug 265916
[NEW PORT] net-im/teleirc: Telegram/IRC bridge for use with any IRC channel and Telegram group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
irc-teleirc-2.2.0.patch
0004-irc-teleirc-new-port.patch (text/plain), 11.99 KB, created by
Jesús Daniel Colmenares Oviedo
on 2022-08-17 18:44:34 UTC
(
hide
)
Description:
irc-teleirc-2.2.0.patch
Filename:
MIME Type:
Creator:
Jesús Daniel Colmenares Oviedo
Created:
2022-08-17 18:44:34 UTC
Size:
11.99 KB
patch
obsolete
>From cd0e741386ad6cbe28a1b116c4fb5a9d8d1905fc Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jes=C3=BAs=20Daniel=20Colmenares=20Oviedo?= > <DtxdF@riseup.net> >Date: Wed, 17 Aug 2022 14:35:52 -0400 >Subject: [PATCH] irc/teleirc: new port > >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. > >WWW: https://github.com/RITlug/teleirc >--- > GIDs | 2 +- > UIDs | 2 +- > irc/teleirc/Makefile | 48 +++++++++++++++++++++ > irc/teleirc/distinfo | 33 ++++++++++++++ > irc/teleirc/files/teleirc.conf | 79 ++++++++++++++++++++++++++++++++++ > irc/teleirc/files/teleirc.in | 58 +++++++++++++++++++++++++ > irc/teleirc/pkg-descr | 5 +++ > irc/teleirc/pkg-plist | 2 + > 8 files changed, 227 insertions(+), 2 deletions(-) > create mode 100644 irc/teleirc/Makefile > create mode 100644 irc/teleirc/distinfo > create mode 100644 irc/teleirc/files/teleirc.conf > create mode 100755 irc/teleirc/files/teleirc.in > create mode 100644 irc/teleirc/pkg-descr > create mode 100644 irc/teleirc/pkg-plist > >diff --git a/GIDs b/GIDs >index a850f8599..7cb6bcfba 100644 >--- a/GIDs >+++ b/GIDs >@@ -260,7 +260,7 @@ _fastdfs:*:313: > # free: 317 > # free: 318 > # free: 319 >-# free: 320 >+teleirc:*:320: > # free: 321 > # free: 322 > # free: 323 >diff --git a/UIDs b/UIDs >index 28fb577bc..742997b34 100644 >--- a/UIDs >+++ b/UIDs >@@ -265,7 +265,7 @@ _fastdfs:*:313:313::0:0:FastDFS Owner:/nonexistent:/usr/sbin/nologin > # free: 317 > # free: 318 > # free: 319 >-# free: 320 >+teleirc:*:320:320::0:0:Telegram and IRC bridge:/nonexistent:/usr/sbin/nologin > # free: 321 > # free: 322 > # free: 323 >diff --git a/irc/teleirc/Makefile b/irc/teleirc/Makefile >new file mode 100644 >index 000000000..0cbf4de5f >--- /dev/null >+++ b/irc/teleirc/Makefile >@@ -0,0 +1,48 @@ >+PORTNAME= teleirc >+DISTVERSIONPREFIX= v >+DISTVERSION= 2.2.0 >+CATEGORIES= irc >+ >+MAINTAINER= DtxdF@riseup.net >+COMMENT= Telegram/IRC bridge for use with any IRC channel and Telegram group >+ >+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 >+ >+GO_BUILDFLAGS= -ldflags "-X main.version=${PORTVERSION}" >+GO_TARGET= ./cmd/teleirc.go:teleirc >+ >+USERS= teleirc >+GROUPS= teleirc >+ >+USE_RC_SUBR= teleirc >+ >+PLIST_SUB= GROUP="${GROUPS:[0]}" \ >+ USER="${USERS:[0]}" >+ >+post-install: >+ @${MKDIR} ${STAGEDIR}/${PREFIX}/etc >+ @${CP} ${FILESDIR}/teleirc.conf ${STAGEDIR}/${PREFIX}/etc/teleirc.conf.sample >+ >+.include <bsd.port.mk> >diff --git a/irc/teleirc/distinfo b/irc/teleirc/distinfo >new file mode 100644 >index 000000000..09f3664e3 >--- /dev/null >+++ b/irc/teleirc/distinfo >@@ -0,0 +1,33 @@ >+TIMESTAMP = 1660698944 >+SHA256 (ritlug-teleirc-v2.2.0_GH0.tar.gz) = 63c870e4a1f1c0625ee7afa0f4bac084429d58da73c106a32ffd74ef609e1310 >+SIZE (ritlug-teleirc-v2.2.0_GH0.tar.gz) = 372733 >+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 >diff --git a/irc/teleirc/files/teleirc.conf b/irc/teleirc/files/teleirc.conf >new file mode 100644 >index 000000000..309c56d9e >--- /dev/null >+++ b/irc/teleirc/files/teleirc.conf >@@ -0,0 +1,79 @@ >+# vim:set filetype=sh: >+# See the Config File Glossary for instructions. >+# https://docs.teleirc.com/en/latest/user/config-file-glossary/ >+ >+############################################################################### >+# # >+# IRC configuration settings # >+# # >+############################################################################### >+ >+#####----- Host connection settings -----##### >+IRC_HOST_IP="" >+ >+ >+#####----- IRC server connection settings -----##### >+IRC_SERVER=chat.freenode.net >+IRC_SERVER_PASSWORD="" >+IRC_PORT=6697 >+ >+## Encryption (SSL/TLS) options >+IRC_USE_SSL=true >+IRC_CERT_ALLOW_EXPIRED=false >+IRC_CERT_ALLOW_SELFSIGNED=false >+ >+ >+#####----- IRC channel settings -----##### >+IRC_CHANNEL="#channel" >+IRC_CHANNEL_KEY="" >+IRC_BLACKLIST="" >+ >+ >+#####----- IRC bot settings -----##### >+IRC_BOT_NAME=tg-bridge-bot >+IRC_BOT_REALNAME="Powered by TeleIRC <github.com/RITlug/teleirc>" >+IRC_BOT_IDENT="teleirc" >+ >+# NickServ options >+IRC_NICKSERV_SERVICE=NickServ >+IRC_NICKSERV_USER="" >+IRC_NICKSERV_PASS="" >+ >+ >+#####----- IRC message settings -----##### >+IRC_PREFIX="<" >+IRC_SUFFIX=">" >+IRC_SEND_STICKER_EMOJI=true >+IRC_SEND_DOCUMENT=false >+IRC_EDITED_PREFIX="(edited) " >+IRC_MAX_MESSAGE_LENGTH=400 >+IRC_SHOW_ZWSP=true >+IRC_NO_FORWARD_PREFIX="" >+IRC_QUIT_MESSAGE="TeleIRC bridge stopped." >+ >+ >+ >+############################################################################### >+# # >+# Telegram configuration settings # >+# # >+############################################################################### >+ >+TELEGRAM_CHAT_ID=-0000000000000 >+TELEIRC_TOKEN=000000000:AAAAAAaAAa2AaAAaoAAAA-a_aaAAaAaaaAA >+MAX_MESSAGES_PER_MINUTE=20 >+SHOW_ACTION_MESSAGE=true >+SHOW_JOIN_MESSAGE=false >+SHOW_KICK_MESSAGE=true >+SHOW_LEAVE_MESSAGE=false >+SHOW_DISCONNECT_MESSAGE=true >+ >+ >+ >+################################################################################ >+# # >+# Imgur configuration settings # >+# # >+############################################################################### >+ >+IMGUR_CLIENT_ID=7d6b00b87043f58 >diff --git a/irc/teleirc/files/teleirc.in b/irc/teleirc/files/teleirc.in >new file mode 100755 >index 000000000..43b9b686c >--- /dev/null >+++ b/irc/teleirc/files/teleirc.in >@@ -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" >diff --git a/irc/teleirc/pkg-descr b/irc/teleirc/pkg-descr >new file mode 100644 >index 000000000..9f9e5314a >--- /dev/null >+++ b/irc/teleirc/pkg-descr >@@ -0,0 +1,5 @@ >+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. >+ >+WWW: https://github.com/RITlug/teleirc >diff --git a/irc/teleirc/pkg-plist b/irc/teleirc/pkg-plist >new file mode 100644 >index 000000000..a610d7bb4 >--- /dev/null >+++ b/irc/teleirc/pkg-plist >@@ -0,0 +1,2 @@ >+bin/teleirc >+@sample(%%USER%%,%%GROUP%%,0640) etc/teleirc.conf.sample etc/teleirc.conf >-- >2.37.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265916
:
235977
|
235981
|
236299
|
236376
|
236377
|
236378
|
240416
|
241834