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