pkgname=tom
pkgver=20210309
pkgrel=1
pkgdesc="Time tracking for the command line"
arch=('i686' 'x86_64')
license=('GPL')
url='https://github.com/jansorg/tom'
makedepends=('go' 'git')

source=(
	"git://github.com/jansorg/tom.git"
)

md5sums=(
	'SKIP'
)

backup=()

pkgver() {
	cd "$srcdir/$pkgname"
	git log -1 --format="%cd" --date=short | sed s/-//g
}

build() {
	cd "$srcdir/$pkgname"
	echo "Running 'go build'..."
	go build .
}

package() {
	install -DT "$srcdir/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
}
