aboutsummaryrefslogtreecommitdiffstats
path: root/community/synapse/APKBUILD
blob: 3ee7b91538b46fd7bcfca16031a2341268ed5d15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=synapse
pkgver=1.30.1
pkgrel=1
pkgdesc="Matrix reference homeserver"
url="https://github.com/matrix-org/synapse"
arch="noarch !armv7 !armhf !s390x !ppc64le" # Tests fail
license="Apache-2.0"
depends="
	python3
	py3-eliot
	py3-txacme
	py3-jsonschema
	py3-frozendict
	py3-canonicaljson
	py3-pynacl
	py3-idna
	py3-service_identity
	py3-twisted
	py3-openssl
	py3-yaml
	py3-asn1
	py3-asn1-modules
	py3-daemonize
	py3-bcrypt
	py3-pillow
	py3-sortedcontainers
	py3-msgpack
	py3-phonenumbers
	py3-six
	py3-attrs
	py3-netaddr
	py3-jinja2
	py3-pymacaroons
	py3-prometheus-client
	py3-treq
	py3-lxml
	py3-psycopg2
	py3-signedjson
	py3-bleach
	py3-typing-extensions
	py3-authlib
	py3-jwt
	py3-saml2
	"
makedepends="py3-setuptools"
checkdepends="py3-mock py3-parameterized py3-hiredis"
pkgusers="synapse"
pkggroups="synapse"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/matrix-org/synapse/archive/v$pkgver.tar.gz
	synapse.initd
	synapse.confd
	relax-crypto-dep.patch
	"

# secfixes:
#   1.30.1-r0:
#     - CVE-2021-3449
#   1.24.0-r0:
#     - CVE-2020-26257
#   1.21.1-r0:
#     - CVE-2020-26891
#   1.20.0-r0:
#     - CVE-2020-26890

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="." trial tests
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -d -g synapse -o synapse -m775 \
		"$pkgdir"/etc/synapse \
		"$pkgdir"/var/lib/synapse

	cp -a synapse/res "$pkgdir"/var/lib/synapse
	chown -R synapse:synapse "$pkgdir"/var/lib/synapse/res

	install -Dm755 "$srcdir"/synapse.initd "$pkgdir"/etc/init.d/synapse
	install -Dm644 "$srcdir"/synapse.confd "$pkgdir"/etc/conf.d/synapse
}

sha512sums="6d697507bafba7685ba26c5dec93bec36ab20bc6d71585788c746da326d7be1ab3ac514b29dca09b70dcec7e68a68e092372f861e1c28e1f9b3aeb46d0f8185a  synapse-1.30.1.tar.gz
4fa4a7bdd80e3b1af0f546723a64cec3b6014c5d52cfb296c41e831f73f72489bd90a3938831c0fd25cdcb03b6e27b54dfd222e325fb30525c39f5c6996687ff  synapse.initd
7c022f0e00c8ac363d6d2e003b6389fb06a3934f68390ebac156cb46bc1366585e6b6cda07b15176bc62a00f5bf21bfda153ff5418b07331257a7075102a6f83  synapse.confd
a5ea37535b81da9371329faa5791fb025980ba3b7df70fe8c8cfe770625b128f8ecb406a89474e74396d01d70d4e7a62bcef7ff16f0ac92e6acc1291797ca175  relax-crypto-dep.patch"