summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce1e11d86386ba6b89ee5a92f7569eb7ae8b6278 (plain)
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
# Maintainer: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=matrix-synapse-git
pkgver=0.29.0.r17.g85b8acdeb
pkgrel=1

pkgdesc="Matrix reference homeserver"
url="https://github.com/matrix-org/synapse"
arch=('any')
license=('Apache')

depends=('python2-jsonschema' 'python2-twisted' 'python2-service-identity'
         'python2-pyopenssl' 'python2-yaml' 'python2-pyasn1' 'python2-pynacl'
         'python2-daemonize' 'python2-bcrypt' 'python2-frozendict'
         'python2-pillow' 'python2-pydenticon' 'python2-ujson' 'python2-blist'
         'python2-pysaml2' 'python2-setuptools'
         'python2-systemd' 'python2-unpaddedbase64' 'python2-canonicaljson'
         'python2-signedjson' 'python2-pymacaroons-pynacl'
         'python2-service-identity' 'python2-msgpack'
         'python2-phonenumbers' 'python2-affinity' 'python2-sortedcontainers'
         'python2-jinja'
         'systemd')
makedepends=('python2-mock' 'git')
optdepends=('python2-psycopg2: PostgreSQL support (instead of built-in SQLite)'
            'python2-netaddr: URL previewing'
            'python2-jinja: e-mail notifications'
            'python2-bleach: e-mail notifications'
            'python2-matrix-synapse-ldap3: LDAP support'
            'python2-psutil: metrics'
	    'python2-matrix-angular-sdk-git: built-in web client (UNMAINTAINED)')

source=("git://github.com/matrix-org/synapse.git#branch=develop"
        'sysusers-synapse.conf')

md5sums=('SKIP'
         'ecd9f66fb57fe1a2e1e2df07a460a35b')

backup=('etc/synapse/log_config.yaml')
install='synapse.install'

provides=('matrix-synapse')
conflicts=('matrix-synapse')

pkgver() {
	cd synapse
	git describe --long --tags | sed 's/^v//;s/-rc/rc/;s/-r/./;s/\([^-]*-g\)/r\1/;s/-/./g'
}

#prepare() {
#	cd synapse
#}

build() {
	cd synapse
	python2 setup.py build 
}

package() {
	cd synapse
	python2 setup.py install --root "${pkgdir}" --optimize=1 --skip-build

	for file in "${pkgdir}/usr/lib/python2.7/site-packages/synapse"/{app,push}/*.py; do
		sed -re 's|env python$|&2.7|' -i "${file}"
	done

	install -dm755 -o 198 -g 198 "$pkgdir"/etc/synapse
	install -Dm644 contrib/systemd/log_config.yaml "$pkgdir"/etc/synapse/log_config.yaml
	install -Dm644 contrib/systemd/synapse.service "$pkgdir"/usr/lib/systemd/system/synapse.service
	install -Dm644 "$srcdir"/sysusers-synapse.conf "$pkgdir"/usr/lib/sysusers.d/synapse.conf
}