mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/matterbridge: new aport
Bridges between a growing number of protocols.
This commit is contained in:
parent
4cdd6d7cc1
commit
bf0e1888b1
39
testing/matterbridge/APKBUILD
Normal file
39
testing/matterbridge/APKBUILD
Normal file
@ -0,0 +1,39 @@
|
||||
# Contributor: Konstantin Kulikov <k.kulikov2@gmail.com>
|
||||
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
|
||||
pkgname=matterbridge
|
||||
pkgver=1.17.4
|
||||
pkgrel=0
|
||||
_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"
|
||||
1
testing/matterbridge/matterbridge.confd
Normal file
1
testing/matterbridge/matterbridge.confd
Normal file
@ -0,0 +1 @@
|
||||
MATTERBRIDGE_OPTS="-conf /etc/matterbridge.toml"
|
||||
15
testing/matterbridge/matterbridge.initd
Normal file
15
testing/matterbridge/matterbridge.initd
Normal file
@ -0,0 +1,15 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name=matterbridge
|
||||
description="Bridges between a growing number of chat protocols"
|
||||
|
||||
command="/usr/bin/matterbridge"
|
||||
command_args="$MATTERBRIDGE_OPTS"
|
||||
command_background=yes
|
||||
command_user=matterbridge:matterbridge
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
8
testing/matterbridge/matterbridge.pre-install
Normal file
8
testing/matterbridge/matterbridge.pre-install
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
name=matterbridge
|
||||
|
||||
addgroup -S "$name" 2>/dev/null
|
||||
adduser -S -D -H -h /var/empty -s /sbin/nologin -G $name -g $name $name 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user