summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7039a745eb5d83ff1b62475cc878cdffc1e6f44f (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
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgname=gomuks-midek-git
_name=gomuks
pkgdesc='A terminal based Matrix client written in Go. Upload and pantalaimon support'
pkgver=r590.1cebea0
pkgrel=1
url='https://git.thisisjoes.site/midek/gomuks'
license=(GPL3)
arch=(x86_64 i686)
depends=(libolm)
makedepends=(go-pie git)
provides=(${_name})
conflicts=("${provides[@]}")
source=("git+https://git.thisisjoes.site/midek/${_name}.git")
sha512sums=(SKIP)

prepare() {
	cd "${srcdir}/${_name}"
	# all the good stuff is in the revert_attachments branch
	git checkout midek
}
pkgver () {
	cd "${srcdir}/${_name}"
	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
}

build () {
	cd "${srcdir}/${_name}"
	# disable encryption so pantalaimon works
	export CGO_ENABLED=0
	go build -v \
		-gcflags "all=-trimpath=${curdir}" \
		-asmflags "all=-trimpath=${curdir}" \
		-ldflags "-extldflags '${LDFLAGS}'" \
		.
}

package () {
	cd "${srcdir}/${_name}"
	install -Dm755 gomuks "${pkgdir}/usr/bin/gomuks"
	install -Dm644 README.md "${pkgdir}/usr/share/doc/${_name}/README.md"
}