aboutsummaryrefslogtreecommitdiffstats
path: root/testing/matterbridge/APKBUILD
blob: e77e3274ba2db060a4131efc837a29267f44cf25 (plain) (blame)
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
# Contributor: Konstantin Kulikov <k.kulikov2@gmail.com>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=matterbridge
pkgver=1.17.4
pkgrel=1
_commit=6c442e23 # git rev-parse --short HEAD
pkgdesc="Bridges between a growing number of chat protocols"
url="https://github.com/42wim/matterbridge"
arch="all"
license="Apache-2.0"
makedepends="go"
subpackages="$pkgname-openrc"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/42wim/matterbridge/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	"

export GOPATH=${GOPATH:-$srcdir/go}
export GOCACHE=${GOCACHE:-$srcdir/go-build}
export GOTMPDIR=${GOTMPDIR:-$srcdir}

build() {
	go build -mod=vendor -ldflags="-w -s -X main.githash=$_commit" .
}

check() {
	go test -short -mod=vendor ./...
}

package() {
	install -Dm755 $builddir/$pkgname $pkgdir/usr/bin/$pkgname
	install -Dm755 $srcdir/$pkgname.initd $pkgdir/etc/init.d/$pkgname
	install -Dm644 $srcdir/$pkgname.confd $pkgdir/etc/conf.d/$pkgname
}

sha512sums="25ef4b3498ebd38217fa7d41f76f4d9253280c38cc597043508ed671217c1607aa4748d8077b937698010e8679508d0756d83ce4d1c2f23ced9ac3a1c9bde412  matterbridge-1.17.4.tar.gz
4dfe463b4c0d2b7cf08c5976e5417af6ec84e11a1e1437356b1624517cb961032903a0a9e11167d0d6223fa9590c9ba157c1e257a718505ed3592627e65a66d0  matterbridge.initd
43b5f450787c40e35e3a419b8f8c06a0ecf3f396ed8a8c58f672164468f788c13b50081ba1397fd857e1768790255616cb3a15f3a3c02603af7268cc8a84ea69  matterbridge.confd"