Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Aug 2021 17:49:07 GMT
From:      Michael Gmelin <grembo@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b8b700d2ce6a - main - net-im/signald: Add new port
Message-ID:  <202108281749.17SHn7C2088571@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by grembo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b8b700d2ce6a0c170fa494d3454807b71a94dc20

commit b8b700d2ce6a0c170fa494d3454807b71a94dc20
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2021-08-28 17:44:23 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2021-08-28 17:47:40 +0000

    net-im/signald: Add new port
    
    Daemon to facilitate communication via Signal Private Messenger
    
    WWW: https://signald.org/
---
 net-im/Makefile                         |   1 +
 net-im/signald/Makefile                 | 123 +++++++++++++++++++++++++++
 net-im/signald/distinfo                 |  51 ++++++++++++
 net-im/signald/files/patch-build.gradle |  74 +++++++++++++++++
 net-im/signald/files/signald.7.in       | 142 ++++++++++++++++++++++++++++++++
 net-im/signald/files/signald.in         |  71 ++++++++++++++++
 net-im/signald/pkg-descr                |  14 ++++
 net-im/signald/pkg-message              |   7 ++
 net-im/signald/pkg-plist                |  27 ++++++
 9 files changed, 510 insertions(+)

diff --git a/net-im/Makefile b/net-im/Makefile
index 152c4218c050..733afeda7221 100644
--- a/net-im/Makefile
+++ b/net-im/Makefile
@@ -144,6 +144,7 @@
     SUBDIR += scudcloud
     SUBDIR += sendxmpp
     SUBDIR += signal-cli
+    SUBDIR += signald
     SUBDIR += slack-term
     SUBDIR += spectral
     SUBDIR += ssh-chat
diff --git a/net-im/signald/Makefile b/net-im/signald/Makefile
new file mode 100644
index 000000000000..eaab9be889f3
--- /dev/null
+++ b/net-im/signald/Makefile
@@ -0,0 +1,123 @@
+PORTNAME=	signald
+DISTVERSION=	0.14.1
+CATEGORIES=	net-im java
+MASTER_SITES=	https://plugins.gradle.org/m2/gradle/plugin/de/fuerstenau/BuildConfigPlugin/1.1.8/:buildconfig \
+		https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.9.0/:jackann \
+		https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.9.9/:jackcore \
+		https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.9.9.2/:jackdbind \
+		https://repo.maven.apache.org/maven2/com/github/turasa/signal-service-java/2.15.3_unofficial_24/:sservice \
+		https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.10.0/:protobuf \
+		https://repo.maven.apache.org/maven2/com/googlecode/libphonenumber/libphonenumber/8.12.17/:libphone \
+		https://repo.maven.apache.org/maven2/com/kohlschutter/junixsocket/junixsocket-common/2.3.2/:jcommon \
+		https://repo.maven.apache.org/maven2/com/kohlschutter/junixsocket/junixsocket-native-common/2.3.2/:jncommon \
+		https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.6.0/:okhttp \
+		https://repo.maven.apache.org/maven2/com/squareup/okio/2.6.0/:okjvm \
+		https://repo.maven.apache.org/maven2/info/picocli/picocli/4.5.2/:picocli \
+		https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-api/2.14.0/:log4j_api \
+		https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.14.0/:log4j_core \
+		https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.66/:bcprov \
+		https://repo.maven.apache.org/maven2/org/flywaydb/flyway-core/7.5.3/:flyway \
+		https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/:jetann \
+		https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.71/:jetkotstdcommon \
+		https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/:jetkotstd \
+		https://repo.maven.apache.org/maven2/org/signal/zkgroup-java/0.7.0/:zkgroup \
+		https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.8.0-beta4/:slf4japi \
+		https://repo.maven.apache.org/maven2/org/slf4j/slf4j-nop/1.8.0-beta4/:slf4jnop \
+		https://repo.maven.apache.org/maven2/org/threeten/threetenbp/1.3.6/:threeten \
+		https://repo.maven.apache.org/maven2/org/whispersystems/signal-client-java/0.8.1/:sclient
+DISTFILES=	BuildConfigPlugin-1.1.8.jar:buildconfig \
+		annotations-13.0.jar:jetann \
+		bcprov-jdk15on-1.66.jar:bcprov \
+		flyway-core-7.5.3.jar:flyway \
+		jackson-annotations-2.9.0.jar:jackann \
+		jackson-core-2.9.9.jar:jackcore \
+		jackson-databind-2.9.9.2.jar:jackdbind \
+		junixsocket-common-2.3.2.jar:jcommon \
+		junixsocket-native-common-2.3.2.jar:jncommon \
+		kotlin-stdlib-1.3.71.jar:jetkotstd \
+		kotlin-stdlib-common-1.3.71.jar:jetkotstdcommon \
+		libphonenumber-8.12.17.jar:libphone \
+		log4j-api-2.14.0.jar:log4j_api \
+		log4j-core-2.14.0.jar:log4j_core \
+		okhttp-4.6.0.jar:okhttp \
+		okio-2.6.0.jar:okjvm \
+		picocli-4.5.2.jar:picocli \
+		protobuf-javalite-3.10.0.jar:protobuf \
+		signal-client-java-0.8.1.jar:sclient \
+		signal-service-java-2.15.3_unofficial_24.jar:sservice \
+		slf4j-api-1.8.0-beta4.jar:slf4japi \
+		slf4j-nop-1.8.0-beta4.jar:slf4jnop \
+		threetenbp-1.3.6.jar:threeten \
+		zkgroup-java-0.7.0.jar:zkgroup
+
+MAINTAINER=	grembo@FreeBSD.org
+COMMENT=	Daemon to facilitate communication via Signal Private Messenger
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+ONLY_FOR_ARCHS=	amd64
+
+EXTRACT_DEPENDS=zip:archivers/zip
+BUILD_DEPENDS=	gradle6>=6.7:devel/gradle6
+LIB_DEPENDS=	libsignal_jni.so:net-im/libsignal-client \
+		libsqlitejdbc.so:java/sqlitejdbc \
+		libzkgroup.so:net-im/zkgroup
+
+USES=		gmake shebangfix
+USE_GITLAB=	yes
+GL_ACCOUNT=	signald
+GL_COMMIT=	227706969ee084c4e06b424bdf0a95a43bdeb051
+
+USE_JAVA=	yes
+JAVA_VERSION=	11+
+JAVA_RUN=	jre
+SUB_FILES=	signald.7
+SUB_LIST=	JAVA_HOME="${JAVA_HOME}" \
+		PKGBASE="${PKGBASE}"
+USE_RC_SUBR=	signald
+
+NO_ARCH=	yes
+
+# re-use user from net-im/signal-cli
+USERS=		signal-cli
+GROUPS=		signal-cli
+
+PLIST_SUB=	VERSION=${DISTVERSION}
+
+MAKE_ENV=	CI_BUILD_REF_NAME=main \
+		CI_COMMIT_SHA="${CI_COMMIT_SHA}" \
+		GRADLE="${LOCALBASE}/bin/gradle --no-daemon" \
+		GRADLE_USER_HOME=${WRKDIR}/gradle-home \
+		JAVA_HOME="${JAVA_HOME}" \
+		SIGNALD_TARGET=x86_64-unknown-freebsd \
+		VERSION="${DISTVERSION}"
+
+ALL_TARGET=	installDist
+
+post-extract:
+	${MKDIR} ${WRKDIR}/jars
+.for f in ${DISTFILES}
+	${CP} ${DISTDIR}/${f:C/:.*//} ${WRKDIR}/jars
+.endfor
+
+post-build:
+	${CP} ${LOCALBASE}/share/java/classes/sqlitejdbc-native.jar \
+		${WRKSRC}/build/install/${PORTNAME}/lib/.
+	${REINPLACE_CMD} -i '' -e 's|#!/usr/bin/env sh|#!/bin/sh|' \
+		${WRKSRC}/build/install/signald/bin/signald
+	zip -d ${WRKSRC}/build/install/${PORTNAME}/lib/zkgroup-java-*.jar \
+		libzkgroup.so
+	zip -d ${WRKSRC}/build/install/${PORTNAME}/lib/signal-client-java-*.jar \
+		libsignal_jni.so
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${DATADIR}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/build/install/${PORTNAME}/bin/${PORTNAME} \
+		${STAGEDIR}${DATADIR}/bin/${PORTNAME}
+	@${MKDIR} ${STAGEDIR}${DATADIR}/lib
+	${INSTALL_DATA} ${WRKSRC}/build/install/${PORTNAME}/lib/*.jar \
+		${STAGEDIR}${DATADIR}/lib/
+	${INSTALL_MAN} ${WRKDIR}/signald.7 ${STAGEDIR}${MANPREFIX}/man/man7
+
+.include <bsd.port.mk>
diff --git a/net-im/signald/distinfo b/net-im/signald/distinfo
new file mode 100644
index 000000000000..0e1a9ae045a1
--- /dev/null
+++ b/net-im/signald/distinfo
@@ -0,0 +1,51 @@
+TIMESTAMP = 1630166976
+SHA256 (annotations-13.0.jar) = ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478
+SIZE (annotations-13.0.jar) = 17536
+SHA256 (bcprov-jdk15on-1.66.jar) = 1b861dba1c5445de9b38a1789c211ef28b9d07e26d1fa38bee717e5b51162ffe
+SIZE (bcprov-jdk15on-1.66.jar) = 5884134
+SHA256 (flyway-core-7.5.3.jar) = d0283d9481ae39cc77d210a5bb176a5c103da292898bfd3a9acb25da059e97d8
+SIZE (flyway-core-7.5.3.jar) = 679850
+SHA256 (BuildConfigPlugin-1.1.8.jar) = 99b5256936af67431a8a92902f253f525837ac3639a5ff05ed2225febaa710af
+SIZE (BuildConfigPlugin-1.1.8.jar) = 52133
+SHA256 (jackson-annotations-2.9.0.jar) = 45d32ac61ef8a744b464c54c2b3414be571016dd46bfc2bec226761cf7ae457a
+SIZE (jackson-annotations-2.9.0.jar) = 66519
+SHA256 (jackson-core-2.9.9.jar) = 3083079be6088db2ed0a0c6ff92204e0aa48fa1de9db5b59c468f35acf882c2c
+SIZE (jackson-core-2.9.9.jar) = 325632
+SHA256 (jackson-databind-2.9.9.2.jar) = fb262d42ea2de98044b62d393950a5aa050435fec38bbcadf2325cf7dc41b848
+SIZE (jackson-databind-2.9.9.2.jar) = 1348331
+SHA256 (junixsocket-common-2.3.2.jar) = 2b501ae7e230b8dbcae0991a10b99bb22b752c583919d6db8e017de53415db0e
+SIZE (junixsocket-common-2.3.2.jar) = 88642
+SHA256 (junixsocket-native-common-2.3.2.jar) = 6a090697071ae30a29c263ffd5999778dd560779974ee15b9586a0aa3dc3e0d2
+SIZE (junixsocket-native-common-2.3.2.jar) = 355182
+SHA256 (kotlin-stdlib-1.3.71.jar) = 5ace22b102a96425e4ac44e0558b927f3857b56a33cbc289cf1b70aee645e6a7
+SIZE (kotlin-stdlib-1.3.71.jar) = 1379827
+SHA256 (kotlin-stdlib-common-1.3.71.jar) = 974f8a9b7bfce3d730a86efe0eab219a72621e8530f91e30c89f400ba98092ec
+SIZE (kotlin-stdlib-common-1.3.71.jar) = 179597
+SHA256 (libphonenumber-8.12.17.jar) = 729483057ef874b01537da8395d67e23b419d504f8ff29ddf5f69da21bf816ac
+SIZE (libphonenumber-8.12.17.jar) = 350448
+SHA256 (log4j-api-2.14.0.jar) = 9791ac85aa3cdad633e512192766f84995eddf4db188cc42facec52a0dae15e8
+SIZE (log4j-api-2.14.0.jar) = 301418
+SHA256 (log4j-core-2.14.0.jar) = f04ee9c0ac417471d9127b5880b96c3147249f20674a8dbb88e9949d855382a8
+SIZE (log4j-core-2.14.0.jar) = 1762731
+SHA256 (okhttp-4.6.0.jar) = 0480d35187423f2fca923c91511a279eb01f27f703afcef40780ae8af460a857
+SIZE (okhttp-4.6.0.jar) = 788355
+SHA256 (okio-2.6.0.jar) = 4d84ef686277b58eb05691ac19cd3befa3429a27274982ee65ea0f07044bcc00
+SIZE (okio-2.6.0.jar) = 243330
+SHA256 (picocli-4.5.2.jar) = b4395e9a67932616efd2245d984bf5fcd453c2c5049558c3ce959ac2af4d3fac
+SIZE (picocli-4.5.2.jar) = 390247
+SHA256 (protobuf-javalite-3.10.0.jar) = 215a94dbe100130295906b531bb72a26965c7ac8fcd9a75bf8054a8ac2abf4b4
+SIZE (protobuf-javalite-3.10.0.jar) = 690955
+SHA256 (signal-client-java-0.8.1.jar) = 6bcf9ab3a77be20b43086fd802d9ade3940f36ed7b99bac2a79b9bcaf0a7808b
+SIZE (signal-client-java-0.8.1.jar) = 1076260
+SHA256 (signal-service-java-2.15.3_unofficial_24.jar) = 3817f4b526bca8cc800a738f6b0eb073d502eece0693c82f22f87b9ac5f9e8ae
+SIZE (signal-service-java-2.15.3_unofficial_24.jar) = 1735667
+SHA256 (slf4j-api-1.8.0-beta4.jar) = 602b712329c84b4a83c40464f4fdfd0fe4238c53ef397139a867064739dbf4e0
+SIZE (slf4j-api-1.8.0-beta4.jar) = 44213
+SHA256 (slf4j-nop-1.8.0-beta4.jar) = c833140c2c210678d4aea0d689696ae0b0bdbdc69d36b565ddf357bacacce052
+SIZE (slf4j-nop-1.8.0-beta4.jar) = 5860
+SHA256 (threetenbp-1.3.6.jar) = f4c23ffaaed717c3b99c003e0ee02d6d66377fd47d866fec7d971bd8644fc1a7
+SIZE (threetenbp-1.3.6.jar) = 514875
+SHA256 (zkgroup-java-0.7.0.jar) = d0099eedd60d6f7d4df5b288175e5d585228ed8897789926bdab69bf8c05659f
+SIZE (zkgroup-java-0.7.0.jar) = 316995
+SHA256 (signald-signald-227706969ee084c4e06b424bdf0a95a43bdeb051_GL0.tar.gz) = 7f64ade2fdf60339b5505f9e3c210d271c982fe7a541bfd11360d26c4dd7038f
+SIZE (signald-signald-227706969ee084c4e06b424bdf0a95a43bdeb051_GL0.tar.gz) = 232775
diff --git a/net-im/signald/files/patch-build.gradle b/net-im/signald/files/patch-build.gradle
new file mode 100644
index 000000000000..19d07c526d55
--- /dev/null
+++ b/net-im/signald/files/patch-build.gradle
@@ -0,0 +1,74 @@
+--- build.gradle.orig	2021-07-20 19:35:21 UTC
++++ build.gradle
+@@ -20,10 +20,13 @@
+ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
+ import org.xml.sax.SAXParseException
+ 
+-plugins {
+-   id 'de.fuerstenau.buildconfig' version '1.1.8'
++buildscript {
++  dependencies {
++    classpath files ("../jars/BuildConfigPlugin-1.1.8.jar")
++  }
+ }
+ 
++apply plugin: 'de.fuerstenau.buildconfig'
+ apply plugin: 'java'
+ apply plugin: 'application'
+ apply plugin: 'idea'
+@@ -86,10 +86,18 @@ String getTarget() {
+     return target
+ }
+ 
++
+ repositories {
+-    maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages
+-    maven {url "https://plugins.gradle.org/m2/"}
+-    mavenCentral()
++  ivy {
++    url "../jars"
++    metadataSources {
++      artifact()
++    }
++    patternLayout {
++      artifact "[artifact]-[revision](-[classifier]).[ext]"
++      artifact "[artifact].[ext]"
++    }
++  }
+ }
+ 
+ sourceSets {
+@@ -109,17 +117,31 @@ configurations {
+ }
+ 
+ dependencies {
+-    implementation 'com.github.turasa:signal-service-java-' + getTarget() + ':2.15.3_unofficial_24'
++    implementation 'com.github.turasa:signal-service-java:2.15.3_unofficial_24'
+     implementation 'org.bouncycastle:bcprov-jdk15on:1.66'
+     implementation 'com.kohlschutter.junixsocket:junixsocket-common:2.3.2'
+     implementation 'com.kohlschutter.junixsocket:junixsocket-native-common:2.3.2'
+     implementation 'org.apache.logging.log4j:log4j-api:2.14.0'
+     implementation 'org.apache.logging.log4j:log4j-core:2.14.0'
+     implementation 'org.slf4j:slf4j-nop:1.8.0-beta4'
++    implementation 'org.slf4j:slf4j-api:1.8.0-beta4'
+     implementation 'info.picocli:picocli:4.5.2'
+-    implementation 'org.xerial:sqlite-jdbc:3.34.0'
++    implementation files('sqlitejdbc-native.jar')
++    implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9'
++    implementation 'com.fasterxml.jackson.annotations:jackson-annotations:2.9.0'
++    implementation 'com.fasterxml.jackson.databind:jackson-databind:2.9.9.2'
++    implementation 'org.whispersystems.libsignal.signal-client-java:signal-client-java:0.8.1'
++    implementation 'org.signal.zkgroup:zkgroup-java:0.7.0'
+     implementation 'org.flywaydb:flyway-core:7.5.3'
+     implementation 'com.google.protobuf:protobuf-javalite:3.10.0'
++    implementation 'okhttp3:okhttp:4.6.0'
++    implementation 'okio:okio:2.6.0'
++    implementation 'org.jetbrains.annotations:annotations:13.0'
++    implementation 'org.jetbrains.kotlin.kotlin-stdlib:kotlin-stdlib:1.3.71'
++    implementation 'org.jetbrains.kotlin.kotlin-stdlib-common:kotlin-stdlib-common:1.3.71'
++    implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.17'
++    implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.17'
++    implementation 'org.threeten.threetenbp:threetenbp:1.3.6'
+     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
+     testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
+ }
diff --git a/net-im/signald/files/signald.7.in b/net-im/signald/files/signald.7.in
new file mode 100644
index 000000000000..fe7607c23ab0
--- /dev/null
+++ b/net-im/signald/files/signald.7.in
@@ -0,0 +1,142 @@
+.\"
+.\" Copyright (c) 2021 Michael Gmelin
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd August 28, 2021
+.Dt SIGNALD 7
+.Os
+.Sh NAME
+.Nm %%PKGBASE%%
+.Nd Daemon to facilitate communication via Signal Private Messenger
+.Sh SYNOPSIS
+.Nm pkg install %%PKGBASE%%
+.Sh DESCRIPTION
+.Em Signald
+is an unofficial utility for interacting with Signal.
+It is a Java based daemon that is running in the background and is
+communicated to over a socket.
+.Pp
+This man page documents how the
+.Fx
+port is installed and how to get started.
+It assumes that the %%PKGBASE%% package was already installed,
+e.g., from the
+.Fx
+package repo as described in
+.Sx SYNOPSIS .
+.Sh GETTING STARTED
+To enable and start the service, run as root
+.Bd -literal -offset indent
+service %%PKGBASE%% enable
+service %%PKGBASE%% start
+.Ed
+.Pp
+Check log output:
+.Bd -literal -offset indent
+cat /var/log/%%PKGBASE%%/%%PKGBASE%%.log
+.Ed
+.Pp
+Install signaldctl, a command line tool that allows interacting with
+the service:
+.Bd -literal -offset indent
+pkg install go
+go install gitlab.com/signald/signald-go/cmd/signaldctl@latest
+.Ed
+.Sh LINKING A DEVICE
+To link an existing device (phone), first enter
+.Bd -literal -offset indent
+~/go/bin/signaldctl account link
+.Ed
+.Pp
+then do "Select Linked Devices -> Link New Device"
+in the Signal smartphone app's menu and scan the QR code shown
+on your terminal.
+.Sh REGISTERING A DEVICE
+.Em WARNING :
+This disconnects other devices using the same MSISDN.
+.Bl -bullet -compact
+.It
+Open your web browser and enable developer mode
+.It
+Go to
+.Lk https://signalcaptchas.org/registration/generate.html
+.It
+Solve the captcha
+.It
+Depending on your browser you are redirected to a URL starting
+with "signalcaptcha://" or it can be seen in the web developer
+console - everything after "//" is the captcha.
+.El
+.Pp
+Register your device using the captcha copied above:
+.Bd -literal -offset indent
+~/go/bin/signaldctl account register [msisdn] --captcha [captcha]
+.Ed
+.Pp
+.Em msisdn
+is your full mobile phone number with country code, e.g., +123456789.
+.Pp
+You will receive a text message containing a verification code on the
+MSISDN specified in the registration call above.
+Use this verification code
+.Bd -literal -offset indent
+~/go/bin/signaldctl account verify [msisdn] [code]
+.Ed
+.Pp
+to complete the registration.
+.Sh SENDING A MESSAGE
+Use this command to send a message
+.Bd -literal -offset indent
+~/go/bin/signaldctl message send -a [msisdn_from] [msisdn_to] [msg]
+.Ed
+.Pp
+You can also send a message to yourself when using a linked device,
+which will show up in "Note to Self", but not cause a notification,
+e.g.,
+.Bd -literal -offset indent
+~/go/bin/signaldctl message send -a +123456789 +123456789 "Beep beep"
+.Ed
+.Sh FILES
+.Bl -tag -width ".Pa /var/run/signald/signald.sock" -compact
+.It Pa /var/db/signald
+Signald database.
+.It Pa /var/log/signald/signald.log
+Signald log output.
+.It Pa /var/run/signald/signald.sock
+Socket to communicate with signald,
+.Em world writable .
+.El
+.Sh SEE ALSO
+.Xr ports 7 ,
+.Xr daemon 8 ,
+.Xr service 8
+.Pp
+.Rs
+.%B "Signald project website"
+.%U https://signald.org
+.Re
+.Sh AUTHORS
+.An -nosplit
+This manual page was written by
+.An Michael Gmelin Aq Mt grembo@FreeBSD.org .
diff --git a/net-im/signald/files/signald.in b/net-im/signald/files/signald.in
new file mode 100644
index 000000000000..308a645d696d
--- /dev/null
+++ b/net-im/signald/files/signald.in
@@ -0,0 +1,71 @@
+#! /bin/sh -
+
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2021 Michael Gmelin <grembo@FreeBSD.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     1. Redistributions of source code must retain the above copyright notice,
+#        this list of conditions and the following disclaimer.
+#     2. Redistributions in binary form must reproduce the above copyright
+#        notice, this list of conditions and the following disclaimer in the
+#        documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# PROVIDE: signald
+# REQUIRE: DAEMON LOGIN NETWORKING
+
+. /etc/rc.subr
+
+name='signald'
+rcvar='signald_enable'
+
+# User-facing settings and their default values.
+
+: ${signald_enable:="NO"}
+: ${signald_user:="signal-cli"}
+: ${signald_group:="signal-cli"}
+: ${signald_data_dir:="/var/db/signald"}
+: ${signald_env:="JAVA_HOME=%%JAVA_HOME%%"}
+
+pidfile="/var/run/${name}/${name}.pid"
+procname="%%JAVA_HOME%%/bin/java"
+
+_daemon_args="-p ${pidfile} -o /var/log/${name}/${name}.log"
+_signald="%%DATADIR%%/bin/${name}"
+_signald_args="-d ${signald_data_dir}"
+command="/usr/sbin/daemon"
+command_args="${_daemon_args} ${_signald} ${_signald_args}"
+
+start_precmd="signald_prestart"
+
+signald_prestart() {
+	if ! install -d -o "${signald_user}" -g "${signald_group}" -m 700 \
+	    "${signald_data_dir}"; then
+		err 1 "Failed to create data directory \"${signald_data_dir}\""
+	fi
+	if ! install -d -o "${signald_user}" -g "${signald_group}" -m 755 \
+	    "/var/run/${name}"; then
+		err 1 "Failed to create run directory \"/var/run/${name}\""
+	fi
+	if ! install -d -o "${signald_user}" -g "${signald_group}" -m 755 \
+	    "/var/log/${name}"; then
+		err 1 "Failed to create log directory \"/var/log/${name}\""
+	fi
+}
+
+load_rc_config "$name"
+run_rc_command "$@"
diff --git a/net-im/signald/pkg-descr b/net-im/signald/pkg-descr
new file mode 100644
index 000000000000..64b371dd3930
--- /dev/null
+++ b/net-im/signald/pkg-descr
@@ -0,0 +1,14 @@
+signald - unofficial utility for interacting with Signal
+
+Signal does not offer any sort of official API. Their server software is
+open source and anyone can figure out the REST endpoints, but formatting the
+payloads turns out to be a little trickier. Signal, unlike traditional
+messaging applications, puts a number requirements around encryption and
+account data storage on the client software. signald aims to handle all of
+the Signal-specific requirements, exposing an API that sends and receives
+unencrypted messages with other software on the same machine.
+
+signald does not come with a user friendly frontend. Users should select an
+existing client to use signald with.
+
+WWW: https://signald.org/
diff --git a/net-im/signald/pkg-message b/net-im/signald/pkg-message
new file mode 100644
index 000000000000..51761fb36c8c
--- /dev/null
+++ b/net-im/signald/pkg-message
@@ -0,0 +1,7 @@
+[
+{ type: install
+  message: <<EOM
+  Please see `man signald' for details on how to get started.
+EOM
+}
+]
diff --git a/net-im/signald/pkg-plist b/net-im/signald/pkg-plist
new file mode 100644
index 000000000000..4de9134f36f1
--- /dev/null
+++ b/net-im/signald/pkg-plist
@@ -0,0 +1,27 @@
+man/man7/signald.7.gz
+%%DATADIR%%/bin/signald
+%%DATADIR%%/lib/annotations-13.0.jar
+%%DATADIR%%/lib/bcprov-jdk15on-1.66.jar
+%%DATADIR%%/lib/flyway-core-7.5.3.jar
+%%DATADIR%%/lib/jackson-annotations-2.9.0.jar
+%%DATADIR%%/lib/jackson-core-2.9.9.jar
+%%DATADIR%%/lib/jackson-databind-2.9.9.2.jar
+%%DATADIR%%/lib/junixsocket-common-2.3.2.jar
+%%DATADIR%%/lib/junixsocket-native-common-2.3.2.jar
+%%DATADIR%%/lib/kotlin-stdlib-1.3.71.jar
+%%DATADIR%%/lib/kotlin-stdlib-common-1.3.71.jar
+%%DATADIR%%/lib/libphonenumber-8.12.17.jar
+%%DATADIR%%/lib/log4j-api-2.14.0.jar
+%%DATADIR%%/lib/log4j-core-2.14.0.jar
+%%DATADIR%%/lib/okhttp-4.6.0.jar
+%%DATADIR%%/lib/okio-2.6.0.jar
+%%DATADIR%%/lib/picocli-4.5.2.jar
+%%DATADIR%%/lib/protobuf-javalite-3.10.0.jar
+%%DATADIR%%/lib/signal-client-java-0.8.1.jar
+%%DATADIR%%/lib/signal-service-java-2.15.3_unofficial_24.jar
+%%DATADIR%%/lib/signald.jar
+%%DATADIR%%/lib/slf4j-api-1.8.0-beta4.jar
+%%DATADIR%%/lib/slf4j-nop-1.8.0-beta4.jar
+%%DATADIR%%/lib/sqlitejdbc-native.jar
+%%DATADIR%%/lib/threetenbp-1.3.6.jar
+%%DATADIR%%/lib/zkgroup-java-0.7.0.jar



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108281749.17SHn7C2088571>