# Contributor: Michał Polański # Maintainer: Bart Ribbers pkgname=dendrite pkgver=0.13.1 pkgrel=1 pkgdesc="Second-generation Matrix homeserver written in Go" url="https://github.com/matrix-org/dendrite" license="Apache-2.0" arch="all" makedepends=" go olm-dev sqlite-dev " subpackages="$pkgname-openrc" pkgusers="$pkgname" pkggroups="$pkgname" install="$pkgname.pre-install" source="$pkgname-$pkgver.tar.gz::https://github.com/matrix-org/dendrite/archive/refs/tags/v$pkgver.tar.gz dendrite.initd dendrite.confd " options="net" # required to download go modules export GOFLAGS="$GOFLAGS -tags=libsqlite3" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { for cmd in dendrite generate-keys create-account; do go build -trimpath -v -o bin/$cmd ./cmd/$cmd done } check() { DENDRITE_TEST_SKIP_NODB=1 go test ./... } package() { install -Dm755 bin/dendrite "$pkgdir"/usr/bin/dendrite install -Dm755 bin/generate-keys "$pkgdir"/usr/bin/dendrite-generate-keys install -Dm755 bin/create-account "$pkgdir"/usr/bin/dendrite-create-account install -Dm644 dendrite-sample.yaml "$pkgdir"/etc/$pkgname/dendrite.yaml install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname } sha512sums=" b7b1b9e8f4f85653cee822bf46a3e192623c9e22629bfad9fe5cd14aad9ff5175e65ad285de1f592ffd8acfe1d012b07cd578ddaf254e3b20b977f38ed54dfbc dendrite-0.13.1.tar.gz 5d228aa3970a176e10e24dc5cd8611103c944de660a65cc1e6221ae65a804b1bfbe0a6465716ccda37c4d82670d0ff27f017c44c382ab9eb25b7bc6e037d01b0 dendrite.initd a6a088683a6aebc431d3eb289bd0d4dbaede698d1a5da25d6af2aad79e9cd36db02ce9173ab6904249f23b88bca5d1630258736feef7e8266e6c22220d74fa1f dendrite.confd "