Import mautrix-whatsapp, a Matrix bridge for WhatsApp.
Port from Renaud Allard (MAINTAINER), OK solene@
This commit is contained in:
parent
130b30caaf
commit
fab5537fbc
37
net/mautrix-whatsapp/Makefile
Normal file
37
net/mautrix-whatsapp/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2020/03/14 16:17:39 abieber Exp $
|
||||
|
||||
COMMENT = matrix-WhatsApp puppeting bridge
|
||||
|
||||
V = 20200225
|
||||
DISTNAME = mautrix-whatsapp-${V}
|
||||
|
||||
CATEGORIES = net
|
||||
|
||||
HOMEPAGE = https://github.com/tulir/mautrix-whatsapp
|
||||
|
||||
MAINTAINER = Renaud Allard <renaud@allard.it>
|
||||
|
||||
WANTLIB += c m pthread
|
||||
|
||||
MASTER_SITES = https://elendil.arnor.org/OpenBSD/
|
||||
|
||||
# GNU Affero General Public License v3.0
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
MODULES = lang/go
|
||||
|
||||
ALL_TARGET = maunium.net/go/mautrix-whatsapp
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
SUBST_VARS += VARBASE
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/mautrix-whatsapp \
|
||||
${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} \
|
||||
${PREFIX}/share/examples/mautrix-whatsapp
|
||||
${INSTALL_DATA} ${WRKSRC}/example-config.yaml \
|
||||
${PREFIX}/share/examples/mautrix-whatsapp
|
||||
|
||||
.include <bsd.port.mk>
|
2
net/mautrix-whatsapp/distinfo
Normal file
2
net/mautrix-whatsapp/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (mautrix-whatsapp-20200225.tar.gz) = sRtx0Yb0J57xV28e8Gg5nrXoWiHqoun+jXzQlDiN//s=
|
||||
SIZE (mautrix-whatsapp-20200225.tar.gz) = 9766113
|
3
net/mautrix-whatsapp/pkg/DESCR
Normal file
3
net/mautrix-whatsapp/pkg/DESCR
Normal file
@ -0,0 +1,3 @@
|
||||
mautrix-whatsassp is a Matrix-WhatsApp puppeting bridge
|
||||
based the Rhymen/go-whatsapp implementation of the
|
||||
sigalor/whatsapp-web-reveng project.
|
12
net/mautrix-whatsapp/pkg/PLIST
Normal file
12
net/mautrix-whatsapp/pkg/PLIST
Normal file
@ -0,0 +1,12 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/03/14 16:17:39 abieber Exp $
|
||||
@newgroup _whatsapp:851
|
||||
@newuser _whatsapp:851:851:daemon:Matrix.org whatsapp bridge Daemon:/var/whatsapp:/sbin/nologin
|
||||
@rcscript ${RCDIR}/mautrix_whatsapp
|
||||
@bin bin/mautrix-whatsapp
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/examples/mautrix-whatsapp/
|
||||
share/examples/mautrix-whatsapp/example-config.yaml
|
||||
@mode 750
|
||||
@owner _whatsapp
|
||||
@group _whatsapp
|
||||
@sample /var/whatsapp/
|
31
net/mautrix-whatsapp/pkg/README
Normal file
31
net/mautrix-whatsapp/pkg/README
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: README,v 1.1.1.1 2020/03/14 16:17:39 abieber Exp $
|
||||
|
||||
+-------------------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} on OpenBSD
|
||||
+-------------------------------------------------------------------------------
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
To be able to run ${PKGSTEM}, you will need the following things:
|
||||
- a Matrix homeserver that supports application services (e.g. synapse)
|
||||
- a WhatsApp client running on a phone or in an emulated Android VM.
|
||||
|
||||
Configuring ${PKGSTEM}
|
||||
======================
|
||||
|
||||
Copy example-config.yaml to config.yaml
|
||||
Update the config to your liking.
|
||||
|
||||
You need to make sure that the address and domain field point to your homeserver
|
||||
You will also need to add your user of admin user under the permissions section.
|
||||
|
||||
Generate the appservice registration file by running ${PKGSTEM} -g
|
||||
|
||||
You can use the -c and -r flags to change the location of the config and
|
||||
registration files. They default to config.yaml and registration.yaml in
|
||||
${VARBASE}/whatsapp.
|
||||
|
||||
Add the path to the registration file to your synapse homeserver.yaml under
|
||||
app_service_config_files. You will then need to restart the synapse server.
|
||||
Remember to restart it every time the registration file is regenerated.
|
17
net/mautrix-whatsapp/pkg/mautrix_whatsapp.rc
Normal file
17
net/mautrix-whatsapp/pkg/mautrix_whatsapp.rc
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# $OpenBSD: mautrix_whatsapp.rc,v 1.1.1.1 2020/03/14 16:17:39 abieber Exp $
|
||||
|
||||
daemon="${TRUEPREFIX}/bin/mautrix-whatsapp"
|
||||
daemon_user="_whatsapp"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_bg=YES
|
||||
rc_reload=NO
|
||||
|
||||
rc_stop() {
|
||||
pkill -INT -xf "${pexp}"
|
||||
}
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue
Block a user