summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 39ff7c5456d346e44269c65448f55e5c5d528961 (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
# Maintainer: Kimiblock Moe

pkgname=sliding-sync-git
arch=('x86_64')
backup=("etc/default/sliding-sync")
pkgver=r1480.3ce665d
pkgrel=2
pkgdesc="Run a sliding sync proxy. An implementation of MSC3575."
url=https://github.com/matrix-org/sliding-sync
license=("Apache")
depends=("matrix-synapse")
source=("git+https://github.com/matrix-org/sliding-sync.git" "sliding-sync-git.service")
makedepends=("go")
sha256sums=('SKIP' "SKIP")
provides=("sliding-sync")

function pkgver(){
	cd sliding-sync
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

function build(){
	cd "${srcdir}/sliding-sync"
	go build ./cmd/syncv3
}

function package(){
	cd sliding-sync
	install -Dm755 "${srcdir}/sliding-sync/syncv3" "${pkgdir}/usr/bin/syncv3"
	install -Dm644 "${srcdir}/sliding-sync-git.service" "${pkgdir}/usr/lib/systemd/system/sliding-sync.service"
	mkdir -p "${pkgdir}/etc/default"
	touch "${pkgdir}/etc/default/sliding-sync"
}