summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 05876a98d4c4d9821b209f369f4e753b20ccb868 (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
# Maintainer: Kevin Schoon <kevinschoon@pm.me>
_pkgname=pomo
pkgname=${_pkgname}-git
pkgver=r135.eb08755
pkgrel=1
pkgdesc='Pomodoro Command Line Interface'
url='https://github.com/kevinschoon/pomo'
arch=(x86_64 aarch64)
license=('MIT')
source=("$pkgname::git+https://github.com/kevinschoon/pomo")
sha512sums=('SKIP')
makedepends=('git' 'go')
conflicts=('pomo')

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

build() {
	cd "${pkgname}/cmd/${_pkgname}"
	go build -ldflags \
		"-X github.com/kevinschoon/pomo/pkg/internal.Version=${pkgver}" \
		-o ../../../pomo
}

package() {
	install -Dm755 pomo "${pkgdir}/usr/bin/pomo"
}