summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c765adffd8a6a9696c28947099fc5b1ae123f5b5 (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
pkgname=discordlogin-git
_pkgname=discordlogin
pkgver=r11.0634b4d
pkgrel=2
pkgdesc='Login/Token component for use with gtkcord3'
arch=('any')
url='https://github.com/diamondburned/discordlogin'
license=('GPL3')
depends=('gtk3' 'webkit2gtk')
makedepends=('git' 'go')
source=('git+https://github.com/diamondburned/discordlogin')
sha1sums=('SKIP')

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

build() {
	# check if user has already set their GoLang path
	if [[ -z "${GOPATH}" ]]; then
		GOPATH="${srcdir}/go"
	fi
	cd $_pkgname
	go build -trimpath
}

package() {
	cd $_pkgname
	install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}