summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 480cabeb0243b8a37c7d2976250aa69951904f75 (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
# Maintainer: Victor Häggqvist <aur a snilius d com>
# https://github.com/victorhaggqvist/archlinux-pkgbuilds
pkgname=skeema-git
_pkgname=skeema
pkgver=r147.4930f00
pkgrel=1
pkgdesc="A tool for managing MySQL tables and schema changes"
arch=(x86_64)
url="https://github.com/skeema/skeema"
license=(Apache)

source=("git+https://github.com/skeema/skeema.git")
sha256sums=('SKIP')

makedepends=(git go)
provides=(skeema)
conflicts=(skeema skeema-git)
options=('!strip')

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

build() {
	mkdir -p "gopath/src/github.com/skeema"
	export GOPATH=$PWD/gopath
	mv $_pkgname gopath/src/github.com/skeema

	go install -v github.com/skeema/skeema
}

package() {
	mkdir -p $pkgdir/usr/bin

	cp $srcdir/gopath/bin/$_pkgname $pkgdir/usr/bin
}