summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 62784d5a11db07d37b091fa38573e72a9cd08705 (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
# Maintainer: Tony Lambiris <tony@criticalstack.com>

pkgname=komanda-cli-git
pkgver=v0.9.4.r15.g61e52d1
pkgrel=1
pkgdesc='The Komanda Command-line IRC Client'
arch=(x86_64)
url='https://github.com/mephux/komanda-cli'
license=(BSD)
makedepends=(go dep)
source=("${pkgname}::git+https://github.com/mephux/komanda-cli.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"

	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${pkgname}"

	install -m755 -d "${srcdir}/go/src/github.com/mephux/"
	cp -a "${srcdir}/${pkgname}" "${srcdir}/go/src/github.com/mephux/komanda-cli"
}

build() {
	cd "${srcdir}/go/src/github.com/mephux/komanda-cli"

	export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go"
	make
}

package() {
	cd "${srcdir}/go/src/github.com/mephux/komanda-cli"

	install -Dm755 bin/komanda "${pkgdir}"/usr/bin/komanda
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/komanda-cli/LICENSE
}