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