freebsd-ports/net-im/signal-cli/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

97 lines
2.8 KiB
Makefile

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>