net-im/matrix-synapse: new package

This commit is contained in:
nemunaire 2018-12-20 18:42:51 +01:00
parent aa1b961f6f
commit de0b0bf058
4 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,4 @@
AUX synapse.init 965 BLAKE2B 5b33e0277721a9348fe3a2d2f87bc275c4f13676eabcd1427ecf9d168a0348902c74fc72453035560fd9190b2ef434cadc3828895a6688abcad9e4b96a081726 SHA512 481aa963a0bd26f85d9c78684bd68681f4df512e2d4d50aa2fe52331c3fcae6cb78cc882a953153cfb1b8a56a322f6a43fefd07069f8535ef364d32a4b77d369
AUX synapse.service 253 BLAKE2B 59fbcd1d4cf0668524c4dbe10b0d779a2987d33e6025d511a695242fd5f7e313a1266e9770e0c08f3ca7d969dd2618ed7957d4d3959216dc852e314f4b34748c SHA512 865f94744d61670fad0de679a2fd1901d89e6cb4c169614bec90afc715f2abb918a21739daeb2c75482226790d06f3d324dee000074a59853bcc0e90e29d93f8
DIST matrix-synapse-0.34.0.tar.gz 1027038 BLAKE2B 38f9ac5682d1460c36bd889779b8d0edb34cc061b9dcd0143fe07abba59bb743de49b5e974044082302b1836fe7e0f25b31b60fb3013a9d655b22836d6f22ed4 SHA512 31094706a5ad94efc509f7b82ee65c034d0cc85426a2b54b7b8723cc497caa747e3b099d27a5df48f8f4f84cf86573bfce6ddbed3d230e40380cd3ece4577dea
EBUILD matrix-synapse-0.34.0.ebuild 2006 BLAKE2B fed6127844b542fcf4aa6d4fa9596208f4ad40a47de2ff63171b75df3cc56d38cde252489c91eaab3fb2b006666090bed26402fde5571f8c6ee5843598843352 SHA512 1804c2f1335c0078a143fb8cba8cfb01ed324714d09cbcd000d96e537b03b5be7a6a862310e7acbd840de9566c1f009178628c6ce676d26b6e919e5aa22802cd

View File

@ -0,0 +1,34 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command=/usr/bin/synctl
command_args="start"
pidfile=/var/run/matrix-synapse/knot.pid
required_files=/var/lib/matrix-synapse/homeserver.yaml
depend() {
need net dns
}
start() {
checkpath -d -m 0750 -o synapse:synapse /var/run/matrix-synapse/ /var/lib/matrix-synapse/
ebegin "Starting synapse"
start-stop-daemon --start \
--pidfile $pidfile --chdir /var/lib/matrix-synapse --exec $command --user synapse:synapse -- $command_args
eend $?
}
stop() {
ebegin "Stoping synapse"
cd /var/lib/matrix-synapse
/usr/bin/synctl stop
# In case remote control is not working
if [ "$?" != 0 ]; then
if [ -f $pidfile ]; then
start-stop-daemon --stop --pidfile $pidfile
fi
fi
ewend $?
}

View File

@ -0,0 +1,14 @@
[Unit]
Description=Matrix Homeserver
After=network.target
[Service]
ExecStart=/usr/bin/synctl start
ExecStop=/usr/bin/synctl stop
PrivateTmp=true
User=synapse
Group=synapse
WorkingDirectory=/var/lib/matrix-synapse
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,65 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6} )
inherit distutils-r1 systemd user
DESCRIPTION="Synapse: Matrix reference homeserver"
HOMEPAGE="https://matrix.org"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
dev-lang/python[sqlite]
>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
>=dev-python/frozendict-1.0.0[${PYTHON_USEDEP}]
>=dev-python/unpaddedbase64-1.1.0[${PYTHON_USEDEP}]
>=dev-python/canonicaljson-1.1.3[${PYTHON_USEDEP}]
>=dev-python/signedjson-1.0.0[${PYTHON_USEDEP}]
>=dev-python/pynacl-1.2.1[${PYTHON_USEDEP}]
>=dev-python/service_identity-16.0.0[${PYTHON_USEDEP}]
>=dev-python/twisted-17.1.0[${PYTHON_USEDEP}]
>=dev-python/treq-15.1.0[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.11.0[${PYTHON_USEDEP}]
>=dev-python/pyasn1-0.1.9[${PYTHON_USEDEP}]
>=dev-python/pyasn1-modules-0.0.7[${PYTHON_USEDEP}]
>=dev-python/daemonize-2.4.2[${PYTHON_USEDEP}]
>=dev-python/bcrypt-3.1.0[${PYTHON_USEDEP}]
>=dev-python/pillow-3.1.2[jpeg,${PYTHON_USEDEP}]
>=dev-python/sortedcontainers-1.4.4[${PYTHON_USEDEP}]
>=dev-python/psutil-2.0.0[${PYTHON_USEDEP}]
>=dev-python/pysaml2-4.0.2[${PYTHON_USEDEP}]
>=dev-python/pymacaroons-pynacl-0.9.3[${PYTHON_USEDEP}]
>=dev-python/msgpack-0.3.0[${PYTHON_USEDEP}]
>=dev-python/phonenumbers-8.2.0[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
>=dev-python/prometheus_client-0.2.0[${PYTHON_USEDEP}]
>=dev-python/attrs-16.0.0[${PYTHON_USEDEP}]
>=dev-python/netaddr-0.7.18[${PYTHON_USEDEP}]
virtual/libffi
"
DEPEND="
${RDEPEND}
"
python_install_all() {
distutils-r1_python_install_all
keepdir /var/lib/${PN}
newinitd "${FILESDIR}/synapse.init" synapse
systemd_newunit "${FILESDIR}/synapse.service" synapse.service
}
pkg_postinst() {
enewgroup synapse
enewuser synapse -1 -1 /var/lib/synapse synapse
}