aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dendrite/APKBUILD
blob: fef332b03e8486dcd54558621c7eba34ea2f32ae (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
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dendrite
pkgver=0.4.1
pkgrel=0
pkgdesc="Second-generation Matrix homeserver written in Go"
url="https://github.com/matrix-org/dendrite"
license="Apache-2.0"
# mips(64):test failures due to timeouts
arch="all !mips !mips64"
options="net" # required to download go modules
makedepends="go"
subpackages="$pkgname-openrc"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
source="https://github.com/matrix-org/dendrite/archive/v$pkgver/dendrite-v$pkgver.tar.gz
	dendrite.initd
	dendrite.confd
	"

build() {
	for cmd in dendrite-monolith-server generate-keys create-account; do
		go build -trimpath -ldflags="-s -w" -v -o bin/$cmd ./cmd/$cmd
	done
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/dendrite-monolith-server "$pkgdir"/usr/bin/dendrite
	install -Dm755 bin/generate-keys "$pkgdir"/usr/bin/dendrite-generate-keys
	install -Dm755 bin/create-account "$pkgdir"/usr/bin/create-account

	install -Dm644 "$builddir"/dendrite-config.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="
98f7429f86a498f0f22a14333e4515a71db1b4f31b8c9ea2db0cfdafcc70336e74f7e131a15a33f5e570330e4c0d1867c222ff40bf1d48ea39c35529ff65eee1  dendrite-v0.4.1.tar.gz
92274e4f52eb0f35822d7f27279efd372b7959d8531ad7a247286727defc375ca4b4939ed7b82fa29061a0b3c923a6c41ac0f27f3cfd8acb9c96af72ffac333c  dendrite.initd
a6a088683a6aebc431d3eb289bd0d4dbaede698d1a5da25d6af2aad79e9cd36db02ce9173ab6904249f23b88bca5d1630258736feef7e8266e6c22220d74fa1f  dendrite.confd
"