blob: a17df448d11e2e65f8e6a72cc1674e3ca2767329 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
PORTNAME= signal-cli
DISTVERSIONPREFIX= v
DISTVERSION= 0.9.0
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-im java
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/${DISTVERSIONFULL}/:jars
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}:jars
MAINTAINER= ports@FreeBSD.org
COMMENT= Command-line and D-Bus interface for Signal and libsignal-service-java
WWW= https://github.com/AsamK/signal-cli
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
EXTRACT_DEPENDS= zip:archivers/zip
BUILD_DEPENDS= asciidoc>0:textproc/asciidoc
LIB_DEPENDS= libsignal_jni.so:net-im/libsignal-client \
libzkgroup.so:net-im/zkgroup
RUN_DEPENDS= libsignal-client>=0.9.0:net-im/libsignal-client
TEST_DEPENDS= qrencode:graphics/libqrencode
USES= gmake shebangfix
USE_GITHUB= yes
GH_ACCOUNT= AsamK
USE_JAVA= yes
JAVA_VERSION= 11+
JAVA_RUN= jre
USE_RC_SUBR= signal_cli
SHEBANG_FILES= bin/${PORTNAME}
SHEBANG_LANG= sh
sh_CMD= /bin/sh
NO_ARCH= yes
SUB_FILES= ${PORTNAME} pkg-message
SUB_LIST= JAVA_HOME="${JAVA_HOME}"
BUILD_WRKSRC= ${WRKSRC}/man
TEST_ENV= ${MAKE_ENV} XDG_DATA_HOME=${WORKDIR}/xdg-data-home
USERS= signal-cli
GROUPS= signal-cli
PLIST_SUB= VERSION=${DISTVERSION}
OPTIONS_DEFINE= DBUS
OPTIONS_DEFAULT= DBUS
DBUS_RUN_DEPENDS= dbus>0:devel/dbus
DBUS_PLIST_FILES= etc/dbus-1/system.d/org.asamk.Signal.conf \
share/dbus-1/services/org.asamk.Signal.service
post-extract:
# 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
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME} \
${STAGEDIR}${DATADIR}/bin/${PORTNAME}
@${MKDIR} ${STAGEDIR}${DATADIR}/lib
${INSTALL_DATA} ${WRKSRC}/lib/*.jar \
${STAGEDIR}${DATADIR}/lib/
${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
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}"
.include <bsd.port.mk>
|