2020-03-25 21:39:53 +00:00
|
|
|
PORTNAME= signal-cli
|
|
|
|
DISTVERSIONPREFIX= v
|
2021-10-22 13:11:39 +00:00
|
|
|
DISTVERSION= 0.9.0
|
2022-02-09 10:01:56 +00:00
|
|
|
PORTREVISION= 1
|
2021-10-22 13:11:39 +00:00
|
|
|
PORTEPOCH= 1
|
2020-03-25 21:39:53 +00:00
|
|
|
CATEGORIES= net-im java
|
2021-03-07 13:51:25 +00:00
|
|
|
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/${DISTVERSIONFULL}/:jars
|
|
|
|
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}:jars
|
2020-03-25 21:39:53 +00:00
|
|
|
|
2022-07-22 00:01:02 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2020-03-25 21:39:53 +00:00
|
|
|
COMMENT= Command-line and D-Bus interface for Signal and libsignal-service-java
|
2022-09-07 21:06:12 +00:00
|
|
|
WWW= https://github.com/AsamK/signal-cli
|
2020-03-25 21:39:53 +00:00
|
|
|
|
|
|
|
LICENSE= GPLv3
|
2020-08-05 10:02:00 +00:00
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
2020-03-25 21:39:53 +00:00
|
|
|
|
2020-12-23 11:39:38 +00:00
|
|
|
EXTRACT_DEPENDS= zip:archivers/zip
|
2021-03-07 13:51:25 +00:00
|
|
|
BUILD_DEPENDS= asciidoc>0:textproc/asciidoc
|
|
|
|
LIB_DEPENDS= libsignal_jni.so:net-im/libsignal-client \
|
|
|
|
libzkgroup.so:net-im/zkgroup
|
2021-10-05 06:41:17 +00:00
|
|
|
RUN_DEPENDS= libsignal-client>=0.9.0:net-im/libsignal-client
|
2021-10-22 14:02:34 +00:00
|
|
|
TEST_DEPENDS= qrencode:graphics/libqrencode
|
2020-03-25 21:39:53 +00:00
|
|
|
|
2021-03-07 13:51:25 +00:00
|
|
|
USES= gmake shebangfix
|
2020-03-25 21:39:53 +00:00
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= AsamK
|
|
|
|
USE_JAVA= yes
|
2020-09-16 11:06:45 +00:00
|
|
|
JAVA_VERSION= 11+
|
2021-03-07 13:51:25 +00:00
|
|
|
JAVA_RUN= jre
|
2020-08-11 11:11:27 +00:00
|
|
|
USE_RC_SUBR= signal_cli
|
2021-03-07 13:51:25 +00:00
|
|
|
SHEBANG_FILES= bin/${PORTNAME}
|
|
|
|
SHEBANG_LANG= sh
|
|
|
|
sh_CMD= /bin/sh
|
2020-03-25 21:39:53 +00:00
|
|
|
|
|
|
|
NO_ARCH= yes
|
|
|
|
|
2020-08-11 11:11:27 +00:00
|
|
|
SUB_FILES= ${PORTNAME} pkg-message
|
|
|
|
SUB_LIST= JAVA_HOME="${JAVA_HOME}"
|
2020-03-25 21:39:53 +00:00
|
|
|
|
2021-03-07 13:51:25 +00:00
|
|
|
BUILD_WRKSRC= ${WRKSRC}/man
|
|
|
|
|
2021-10-22 14:02:34 +00:00
|
|
|
TEST_ENV= ${MAKE_ENV} XDG_DATA_HOME=${WORKDIR}/xdg-data-home
|
|
|
|
|
2020-03-25 21:39:53 +00:00
|
|
|
USERS= signal-cli
|
|
|
|
GROUPS= signal-cli
|
|
|
|
|
2020-10-14 17:28:16 +00:00
|
|
|
PLIST_SUB= VERSION=${DISTVERSION}
|
|
|
|
|
2020-03-25 21:39:53 +00:00
|
|
|
OPTIONS_DEFINE= DBUS
|
|
|
|
OPTIONS_DEFAULT= DBUS
|
|
|
|
|
2020-10-14 17:28:16 +00:00
|
|
|
DBUS_RUN_DEPENDS= dbus>0:devel/dbus
|
2020-03-25 21:39:53 +00:00
|
|
|
DBUS_PLIST_FILES= etc/dbus-1/system.d/org.asamk.Signal.conf \
|
|
|
|
share/dbus-1/services/org.asamk.Signal.service
|
|
|
|
|
|
|
|
post-extract:
|
2021-03-07 13:51:25 +00:00
|
|
|
# Delete bundled libraries from the JARs. Otherwise, they are going to conflict
|
|
|
|
# with the libraries installed by net-im/zkgroup and net-im/libsignal-client.
|
|
|
|
zip -d ${WRKSRC}/lib/zkgroup-java-*.jar libzkgroup.so
|
|
|
|
zip -d ${WRKSRC}/lib/signal-client-java-*.jar libsignal_jni.so
|
2020-03-25 21:39:53 +00:00
|
|
|
|
|
|
|
do-install:
|
2021-03-07 13:51:25 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/bin
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME} \
|
2020-03-25 21:39:53 +00:00
|
|
|
${STAGEDIR}${DATADIR}/bin/${PORTNAME}
|
2021-03-07 13:51:25 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/lib
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/lib/*.jar \
|
|
|
|
${STAGEDIR}${DATADIR}/lib/
|
2020-03-25 21:39:53 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} \
|
|
|
|
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/signal-cli.1 \
|
|
|
|
${STAGEDIR}${MAN1PREFIX}/share/man/man1
|
|
|
|
|
|
|
|
post-install-DBUS-on:
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/share/dbus-1/services
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/org.asamk.Signal.service \
|
|
|
|
${STAGEDIR}${PREFIX}/share/dbus-1/services
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/dbus-1/system.d
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/data/org.asamk.Signal.conf \
|
|
|
|
${STAGEDIR}${PREFIX}/etc/dbus-1/system.d
|
|
|
|
|
2021-10-22 14:02:34 +00:00
|
|
|
pre-test:
|
|
|
|
if [ "${_TEST_SIGNAL_CLI_USERNAME}" = "" ]; then \
|
|
|
|
@${ECHO_MSG} "_TEST_SIGNAL_CLI_USERNAME must be set to run tests"; \
|
|
|
|
${FALSE}; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
do-test:
|
|
|
|
${SETENV} ${TEST_ENV} ${STAGEDIR}${DATADIR}/bin/signal-cli \
|
|
|
|
link --name "${PORTNAME} test $$(date)" | \
|
|
|
|
xargs -n 1 qrencode -t ANSI256
|
|
|
|
${SETENV} ${TEST_ENV} ${STAGEDIR}${DATADIR}/bin/signal-cli \
|
|
|
|
send --message "${PORTNAME} test $$(date)" \
|
|
|
|
"${_TEST_SIGNAL_CLI_USERNAME}"
|
|
|
|
|
2020-03-25 21:39:53 +00:00
|
|
|
.include <bsd.port.mk>
|