From a24520a9a52fbd19f7148e1c4d85343b39baa220 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Sat, 21 Jan 2023 20:17:36 -0500 Subject: net-im/mautrix-*: update postinst, config Signed-off-by: Julien Roy --- .../mautrix-facebook/mautrix-facebook-0.4.1.ebuild | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'net-im/mautrix-facebook') diff --git a/net-im/mautrix-facebook/mautrix-facebook-0.4.1.ebuild b/net-im/mautrix-facebook/mautrix-facebook-0.4.1.ebuild index 01fac40..2a7c8c8 100644 --- a/net-im/mautrix-facebook/mautrix-facebook-0.4.1.ebuild +++ b/net-im/mautrix-facebook/mautrix-facebook-0.4.1.ebuild @@ -55,18 +55,22 @@ src_install() { } pkg_postinst() { + optfeature "Prometheus statistics" dev-python/prometheus_client + optfeature "Sqlite backend" dev-python/aiosqlite + einfo - elog "Before you can use ${PN}, you must configure it correctly." + elog "" + elog "Before you can use ${PN}, you must configure it correctly" elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\"" - elog "Next, you must generate a registration file using the following command" - elog "sudo -u ${PN} /usr/bin/python -m ${PN/-/_} -c /etc/mautrix/${PN}.yaml g" - elog "Next, you must register you registration.yaml file with your homeserver" - elog "Then you must launch ${PN} by specifying the registration file" - elog "sudo -u ${PN} /usr/bin/python -m ${PN/-/_} -r registration.yaml" - elog "After this you can register the bridge with your homeserver" - elog "Finally, you can start the ${PN} daemon" + elog "When done, run the following command: emerge --config ${PN}" + elog "Then, you must register the bridge with your homeserver" + elog "Refer to your homeserver's documentation for instructions" + elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml" + elog "Finally, you may start the ${PN} daemon" einfo +} - optfeature "Prometheus statistics" dev-python/prometheus_client - optfeature "Sqlite backend" dev-python/aiosqlite +pkg_config() { + su - "${PN}" -s /bin/sh -c \ + "/usr/bin/python -m \"${PN/-/_}\" -c \"/etc/mautrix/${PN}.yaml -g /var/lib/${PN/-/\/}/registration.yaml\"" } -- cgit v1.2.3