aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dendrite/APKBUILD
blob: 11a4a4ccb4a2ea35b1715f47e80f6130a1216139 (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
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dendrite
pkgver=0.3.11
pkgrel=1
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="b27cd7810caf896e1d974fa4fc25ce323151ff6e0d5dfd755fa5bbdf491e9229331a216d228c1068f76adaf97d4999c1301d3cf5a5a524c630119bc63f1224f0  dendrite-v0.3.11.tar.gz
92274e4f52eb0f35822d7f27279efd372b7959d8531ad7a247286727defc375ca4b4939ed7b82fa29061a0b3c923a6c41ac0f27f3cfd8acb9c96af72ffac333c  dendrite.initd
a6a088683a6aebc431d3eb289bd0d4dbaede698d1a5da25d6af2aad79e9cd36db02ce9173ab6904249f23b88bca5d1630258736feef7e8266e6c22220d74fa1f  dendrite.confd"