aboutsummaryrefslogtreecommitdiffstats
path: root/heisenbridge/PKGBUILD
diff options
context:
space:
mode:
diffstat (limited to 'heisenbridge/PKGBUILD')
-rw-r--r--heisenbridge/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/heisenbridge/PKGBUILD b/heisenbridge/PKGBUILD
new file mode 100644
index 0000000..8aa24b4
--- /dev/null
+++ b/heisenbridge/PKGBUILD
@@ -0,0 +1,52 @@
1# Maintainer: Yigit Sever <yigit at yigitsever dot com>
2# Contributor: Bjoern Franke <bjo+aur@schafweide.org>
3
4pkgname=heisenbridge
5pkgver=1.14.1
6pkgrel=1
7pkgdesc="a bouncer-style Matrix IRC bridge"
8url="https://github.com/hifi/heisenbridge"
9depends=('python' 'python-irc' 'python-ruamel-yaml' 'python-aiohttp-socks'
10 'python-mautrix')
11makedepends=('python-setuptools' 'python-pytest-runner')
12license=('MIT')
13arch=('any')
14source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" "${pkgname}.service" "${pkgname}.sysusers" "${pkgname}.tmpfiles")
15sha256sums=('ec7848b550c4cb00563276508a8924d731da658bb0f961ccbb886514e3a817f2'
16 '67487b221bff329952f5c95186c4ea794c7e7a3e25e6d213075fd306c68cfa95'
17 'b3bc4328ead7afd186d5a191fabc347543c0fad17dc01047a4cf0532d999f255'
18 '24bd23e4427aaf635a91b170c07abe8a6b1c62cbad47e50a161c12807641d351')
19backup=("etc/${pkgname}/registration.yaml")
20install="${pkgname}.install"
21_dirname="${pkgname}-${pkgver}"
22
23prepare() {
24 cd "${srcdir}/${_dirname}"
25 # create an empty registration file so that permissions get written
26 # properly from the get go this way secret keys are never world
27 # readable
28 touch registration.yaml
29}
30
31build() {
32 cd "${srcdir}/${_dirname}"
33 python setup.py build
34}
35
36package() {
37 cd "${srcdir}/${_dirname}"
38
39 _shared_dir="/usr/share/${pkgname}"
40
41 python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr" --install-data="${_shared_dir}"
42
43 # it's a semi-common failure for python packages to install tests in
44 # the main dir which would make them conflict eachother
45 rm -rf "${pkgdir}$(python -c 'import site; print(site.getsitepackages()[0])')/tests"
46
47 install -Dvm 644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
48 install -Dvm 644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
49 install -Dvm 644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
50
51 install -Dvm 640 registration.yaml "${pkgdir}/etc/${pkgname}/registration.yaml"
52}