mirror of https://git.FreeBSD.org/ports.git
net-im/mautrix-whatsapp: [NEW PORT] Matrix-WhatsApp puppeting bridge
Mautrix-whatsapp bridges messages between WhatsApp and a Matrix server. PR: 283671 Approved by: yuri@ (Mentor)
This commit is contained in:
parent
1b785309d4
commit
4161ac7058
2
GIDs
2
GIDs
|
@ -313,7 +313,7 @@ neo4j:*:369:
|
|||
_wsdd:*:370:
|
||||
reposilite:*:371:
|
||||
beam:*:372:
|
||||
# free: 373
|
||||
mautrix-whatsapp:*:373:
|
||||
# free: 374
|
||||
# free: 375
|
||||
# free: 376
|
||||
|
|
2
UIDs
2
UIDs
|
@ -319,7 +319,7 @@ neo4j:*:369:369::0:0:neo4j Database Daemon:/nonexistent:/usr/sbin/nologin
|
|||
_wsdd:*:370:370::0:0:Web Service Discovery Daemon:/nonexistent:/usr/sbin/nologin
|
||||
reposilite:*:371:371::0:0:Reposilite user:/nonexistent:/usr/sbin/nologin
|
||||
beam:*:372:372::0:0:Erlang BEAM VM user:/nonexistent:/usr/sbin/nologin
|
||||
# free: 373
|
||||
mautrix-whatsapp:*:373:373::0:0:Mautrix-Whatsapp Daemon:/nonexistent:/usr/sbin/nologin
|
||||
# free: 374
|
||||
# free: 375
|
||||
# free: 376
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
SUBDIR += matterbridge
|
||||
SUBDIR += matterhorn
|
||||
SUBDIR += matterircd
|
||||
SUBDIR += mautrix-whatsapp
|
||||
SUBDIR += mbpurple
|
||||
SUBDIR += mcabber
|
||||
SUBDIR += meanwhile
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
PORTNAME= mautrix-whatsapp
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.12.4
|
||||
CATEGORIES= net-im
|
||||
|
||||
MAINTAINER= juw@posteo.de
|
||||
COMMENT= Matrix-WhatsApp puppeting bridge
|
||||
WWW= https://maunium.net/go/mautrix-whatsapp/
|
||||
|
||||
LICENSE= AGPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/../../LICENSE
|
||||
|
||||
LIB_DEPENDS= libolm.so:security/olm
|
||||
|
||||
USES= go:modules
|
||||
USE_RC_SUBR= mautrix_whatsapp
|
||||
|
||||
GO_MODULE= go.mau.fi/mautrix-whatsapp
|
||||
|
||||
WRKSRC_SUBDIR= cmd/${PORTNAME}
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}/${ETCDIR}
|
||||
${MKDIR} ${STAGEDIR}/var/log/mautrix-whatsapp
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -0,0 +1,5 @@
|
|||
TIMESTAMP = 1755441631
|
||||
SHA256 (go/net-im_mautrix-whatsapp/mautrix-whatsapp-v0.12.4/v0.12.4.mod) = e9bbcdc23e1db37815ec870fe4a8d227bd113509e21e3382d34dcf502b0759ca
|
||||
SIZE (go/net-im_mautrix-whatsapp/mautrix-whatsapp-v0.12.4/v0.12.4.mod) = 1737
|
||||
SHA256 (go/net-im_mautrix-whatsapp/mautrix-whatsapp-v0.12.4/v0.12.4.zip) = 340189c5a9f6559fd4b2e4ba447cb2cccf22bbeff82a04d01e7924a39034f792
|
||||
SIZE (go/net-im_mautrix-whatsapp/mautrix-whatsapp-v0.12.4/v0.12.4.zip) = 170704
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: mautrix_whatsapp
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# mautrix_whatsapp_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable mautrix_whatsapp.
|
||||
# mautrix_whatsapp_config (path): Set to %%ETCDIR%%/config.yaml
|
||||
# by default.
|
||||
# mautrix_whatsapp_logfile (path): Set to /var/log/mautrix-whatsapp/mautrix-whatsapp.log
|
||||
# by default.
|
||||
# mautrix_whatsapp_user (user): Set user to run mautrix-whatsapp.
|
||||
# Default is "mautrix-whatsapp".
|
||||
# mautrix_whatsapp_group (group): Set group to run mautrix-whatsapp.
|
||||
# Default is "mautrix-whatsapp".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
desc="Matrix-WhatsApp puppeting bridge"
|
||||
name=mautrix_whatsapp
|
||||
rcvar=mautrix_whatsapp_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${mautrix_whatsapp_enable:=NO}
|
||||
: ${mautrix_whatsapp_config=%%ETCDIR%%/config.yaml}
|
||||
: ${mautrix_whatsapp_logfile=/var/log/mautrix-whatsapp/mautrix-whatsapp.log}
|
||||
: ${mautrix_whatsapp_user=mautrix-whatsapp}
|
||||
: ${mautrix_whatsapp_group=mautrix-whatsapp}
|
||||
|
||||
command=/usr/sbin/daemon
|
||||
procname=/usr/local/bin/mautrix-whatsapp
|
||||
pidfile=/var/run/${name}.pid
|
||||
|
||||
command_args="-cf -p ${pidfile} -o ${mautrix_whatsapp_logfile} -H ${procname} -c ${mautrix_whatsapp_config}"
|
||||
|
||||
start_precmd=mautrix_whatsapp_startprecmd
|
||||
|
||||
mautrix_whatsapp_startprecmd()
|
||||
{
|
||||
if [ ! -e ${pidfile} ]; then
|
||||
install -o ${mautrix_whatsapp_user} -g ${mautrix_whatsapp_group} /dev/null ${pidfile}
|
||||
fi
|
||||
|
||||
if [ ! -e ${mautrix_whatsapp_logfile} ]; then
|
||||
install -o ${mautrix_whatsapp_user} -g ${mautrix_whatsapp_group} /dev/null ${mautrix_whatsapp_logfile}
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,3 @@
|
|||
Mautrix-whatsapp is a Matrix-WhatsApp puppeting bridge, which means it runs
|
||||
along a Matrix server and relays messages between a WhatsApp account and a
|
||||
Matrix account.
|
|
@ -0,0 +1,3 @@
|
|||
bin/mautrix-whatsapp
|
||||
@dir(mautrix-whatsapp,mautrix-whatsapp) %%ETCDIR%%
|
||||
@dir(mautrix-whatsapp,mautrix-whatsapp) /var/log/mautrix-whatsapp
|
Loading…
Reference in New Issue