summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2018-05-17 16:52:36 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2018-05-17 16:52:36 +0200
commit794767df4af5581d638c5d7d7af2f1731d719528 (patch)
tree6158e3b2f8cb7c95252d724513ccdd0ca89f6592
parentaf0f235faddec040f6f927db117350a9652dc9f6 (diff)
downloadnet-794767df4af5581d638c5d7d7af2f1731d719528.tar.gz
net-794767df4af5581d638c5d7d7af2f1731d719528.tar.xz
synapse: initial exheres
-rw-r--r--metadata/accounts/groups/synapse.conf0
-rw-r--r--metadata/accounts/users/synapse.conf4
-rw-r--r--packages/net/synapse/synapse-0.29.0.exheres-080
3 files changed, 84 insertions, 0 deletions
diff --git a/metadata/accounts/groups/synapse.conf b/metadata/accounts/groups/synapse.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/metadata/accounts/groups/synapse.conf
diff --git a/metadata/accounts/users/synapse.conf b/metadata/accounts/users/synapse.conf
new file mode 100644
index 0000000..45585f0
--- /dev/null
+++ b/metadata/accounts/users/synapse.conf
@@ -0,0 +1,4 @@
+gecos = User for Synapse Matrix homeserver
+home = /dev/null
+shell = /sbin/nologin
+primary_group = synapse
diff --git a/packages/net/synapse/synapse-0.29.0.exheres-0 b/packages/net/synapse/synapse-0.29.0.exheres-0
new file mode 100644
index 0000000..25eeaad
--- /dev/null
+++ b/packages/net/synapse/synapse-0.29.0.exheres-0
@@ -0,0 +1,80 @@
+# Copyright 2018 Timo Gurr <tgurr@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ user=matrix-org tag=v${PV} ] \
+ setup-py [ import=setuptools has_bin=true multibuild=false blacklist=3 test=pytest ] \
+ systemd-service [ systemd_files=[ contrib/systemd/synapse.service ] ]
+
+SUMMARY="Matrix reference homeserver"
+DESCRIPTION="
+Synapse is the reference python/twisted Matrix homeserver implementation.
+"
+HOMEPAGE+=" https://matrix.org"
+
+LICENCES="Apache-2.0"
+SLOT="0"
+PLATFORMS="~amd64"
+MYOPTIONS=""
+
+# Missing test dependencies
+RESTRICT="test"
+
+DEPENDENCIES="
+ build+run:
+ group/${PN}
+ user/${PN}
+ dev-python/bcrypt[>=3.1.0][python_abis:*(-)?]
+ dev-python/blist[python_abis:*(-)?]
+ dev-python/canonicaljson[>=1.1.3][python_abis:*(-)?]
+ dev-python/daemonize[python_abis:*(-)?]
+ dev-python/frozendict[>=0.4][python_abis:*(-)?]
+ dev-python/jsonschema[>=2.5.1][python_abis:*(-)?]
+ dev-python/msgpack[>=0.3.0][python_abis:*(-)?]
+ dev-python/phonenumbers[>=8.2.0][python_abis:*(-)?]
+ dev-python/Pillow[python_abis:*(-)?]
+ dev-python/pyasn1[python_abis:*(-)?]
+ dev-python/pydenticon[python_abis:*(-)?]
+ dev-python/pymacaroons[>=0.13.0][python_abis:*(-)?]
+ dev-python/pynacl[>=1.2.1][python_abis:*(-)?]
+ dev-python/pyopenssl[>=0.15][python_abis:*(-)?]
+ dev-python/pysaml2[>=3.0.0][python_abis:*(-)?]
+ dev-python/PyYAML[python_abis:*(-)?]
+ dev-python/service_identity[>=1.0.0][python_abis:*(-)?]
+ dev-python/signedjson[>=1.0.0][python_abis:*(-)?]
+ dev-python/six[python_abis:*(-)?]
+ dev-python/unpaddedbase64[>=1.1.0][python_abis:*(-)?]
+ net-twisted/Twisted[>=16.0.0][python_abis:*(-)?]
+ suggestion:
+ dev-python/psutil[>=2.0.0][python_abis:*(-)?] [[
+ description = [ Required for gathering metrics ]
+ ]]
+"
+
+src_prepare() {
+ setup-py_src_prepare
+
+ # https://github.com/matrix-org/synapse/issues/3164
+ edo sed \
+ -e 's:pymacaroons-pynacl:pymacaroons:g' \
+ -i synapse/python_dependencies.py
+}
+
+src_install() {
+ setup-py_src_install
+
+ keepdir /var/lib/synapse
+ edo chown synapse:synapse "${IMAGE}"/var/lib/synapse
+
+ install_systemd_files
+}
+
+pkg_postinst() {
+ elog "Generate a default configuration file:"
+ elog "cd /var/lib/synapse"
+ elog "python2 -m synapse.app.homeserver \\"
+ elog " --server-name my.domain.name \\"
+ elog " --config-path /etc/synapse/homeserver.yaml \\"
+ elog " --generate-config \\"
+ elog " --report-stats=no"
+}
+