pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/chat/matrix-synapse chat/matrix-synapse: MESSAGE exorcism



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c115ddbc0f93
branches:  trunk
changeset: 387374:c115ddbc0f93
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Fri Oct 28 13:07:21 2022 +0000

description:
chat/matrix-synapse: MESSAGE exorcism

This had MESSAGE to given an example config generation command (which
probably follows upstream docs), and to warn about the deficient
sqlite in NetBSD base.  Move them to files/ and install as
documentation.  Add a caution to the Makefile near the sqlite include.

(It remains to actually fix the sqlite issue.)

diffstat:

 chat/matrix-synapse/MESSAGE  |  18 ------------------
 chat/matrix-synapse/Makefile |  17 ++++++++++++++---
 chat/matrix-synapse/PLIST    |   4 +++-
 3 files changed, 17 insertions(+), 22 deletions(-)

diffs (87 lines):

diff -r 6d165310d4a3 -r c115ddbc0f93 chat/matrix-synapse/MESSAGE
--- a/chat/matrix-synapse/MESSAGE       Fri Oct 28 10:37:21 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.3 2022/03/18 12:59:38 gdt Exp $
-
-To generate a Synapse configuration, run:
-
-cd ${SYNAPSE_DATA} &&
-${PYTHONBIN} -m synapse.app.homeserver \
-       --server-name my.domain.name \
-       --config-path ${PKG_SYSCONFDIR}/homeserver.yaml \
-       --config-directory ${PKG_SYSCONFDIR} \
-       --generate-config \
-       --report-stats=no
-
-The builtin SQLite3 in NetBSD lacks features needed by Synapse.  To
-use Synapse with SQLite3, one must build with pgksrc sqlite3, via
-PREFER_PKGSRC+=sqlite3.
-
-===========================================================================
diff -r 6d165310d4a3 -r c115ddbc0f93 chat/matrix-synapse/Makefile
--- a/chat/matrix-synapse/Makefile      Fri Oct 28 10:37:21 2022 +0000
+++ b/chat/matrix-synapse/Makefile      Fri Oct 28 13:07:21 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.62 2022/10/19 14:25:18 nia Exp $
+# $NetBSD: Makefile,v 1.63 2022/10/28 13:07:21 gdt Exp $
 
 DISTNAME=      matrix-synapse-1.67.0
+PKGREVISION=   1
 CATEGORIES=    chat
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=matrix-org/}
 GITHUB_PROJECT=        synapse
@@ -42,6 +43,8 @@
 DEPENDS+=      ${PYPKGPREFIX}-service_identity>=18.1.0:../../security/py-service_identity
 DEPENDS+=      ${PYPKGPREFIX}-signedjson>=1.1.0:../../security/py-signedjson
 DEPENDS+=      ${PYPKGPREFIX}-sortedcontainers>=1.4.4:../../devel/py-sortedcontainers
+# NB: synapse needs features missing in NetBSD base system sqlite, and probably
+# missing in other builds.
 DEPENDS+=      ${PYPKGPREFIX}-sqlite3>=0:../../databases/py-sqlite3
 DEPENDS+=      ${PYPKGPREFIX}-treq>=15.1:../../devel/py-treq
 DEPENDS+=      ${PYPKGPREFIX}-twisted>=18.9.0:../../net/py-twisted
@@ -62,11 +65,14 @@
 USE_TOOLS+=    perl:run
 REPLACE_PERL+= scripts/sync_room_to_group.pl
 
-PKG_SYSCONFSUBDIR=     matrix-synapse
+# Avoid the pyNN- prefix in config, doc, and so on.
+HUMAN_PKGNAME=         matrix-synapse
+PKG_SYSCONFSUBDIR=     ${HUMAN_PKGNAME}
+DOCDIR=                        ${PREFIX}/share/doc/${HUMAN_PKGNAME}
 
 SYNAPSE_USER?= synapse
 SYNAPSE_GROUP?=        ${SYNAPSE_USER}
-SYNAPSE_DATA?= ${VARBASE}/db/matrix-synapse
+SYNAPSE_DATA?= ${VARBASE}/db/${HUMAN_PKGNAME}
 BUILD_DEFS+=   SYNAPSE_USER SYNAPSE_GROUP SYNAPSE_DATA VARBASE
 
 OWN_DIRS_PERMS+=               ${SYNAPSE_DATA} ${SYNAPSE_USER} ${SYNAPSE_GROUP} 0770
@@ -99,6 +105,11 @@
        # Otherwise, this file is installed and pollutes PLIST.
        rm ${WRKSRC}/synapse/handlers/room.py.orig
 
+post-install:
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} files/README.pkgsrc.txt ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} files/README.pkgsrc.NetBSD.txt ${DESTDIR}${DOCDIR}
+
 # \todo Grok upstream's new test scheme and port to it.
 # test status as of 1.51.0
 # 51 warnings, 1 error
diff -r 6d165310d4a3 -r c115ddbc0f93 chat/matrix-synapse/PLIST
--- a/chat/matrix-synapse/PLIST Fri Oct 28 10:37:21 2022 +0000
+++ b/chat/matrix-synapse/PLIST Fri Oct 28 13:07:21 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.32 2022/10/06 13:57:53 gdt Exp $
+@comment $NetBSD: PLIST,v 1.33 2022/10/28 13:07:21 gdt Exp $
 bin/export_signing_key
 bin/generate_config
 bin/generate_log_config
@@ -1389,3 +1389,5 @@
 ${PYSITELIB}/synapse/util/wheel_timer.pyc
 ${PYSITELIB}/synapse/visibility.py
 ${PYSITELIB}/synapse/visibility.pyc
+share/doc/matrix-synapse/README.pkgsrc.txt
+share/doc/matrix-synapse/README.pkgsrc.NetBSD.txt



Home | Main Index | Thread Index | Old Index