summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 20ea8b5734ebd53893e7478e320922c1afdf4843 (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
# Maintainer: David Borzek <dev@davidborzek.de>
_pkgname=spofi
pkgname=spofi-git
pkgver=r16.125421b
pkgrel=1
pkgdesc="Control spotify using rofi."
arch=(x86_64)
url="https://github.com/davidborzek/spofi"
license=('MIT')
depends=('rofi')
makedepends=('go' 'git')
provides=(spofi)
source=("$_pkgname"::"git+$url#branch=main")
md5sums=('SKIP')

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

build() {
	cd "${_pkgname}"
	if [[ "$GOPATH" == "" ]]; then
		GOPATH="$HOME/go" go build -o spofi
	else
		go build -o spofi
	fi
}

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