summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b56320aed7eedb08846a1586abde5aa59681438 (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: Robin Candau <antiz@archlinux.org>

pkgname=blahaj-git
_pkgname="${pkgname%-git}"
pkgver=2.0.1.r16.8a35b5c
pkgrel=2
pkgdesc="Gay sharks at your local terminal - lolcat-like CLI tool (git version)"
arch=('x86_64')
url="https://blahaj.queer.software"
license=('BSD')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
depends=('crystal' 'libyaml')
makedepends=('git' 'shards')
source=("${_pkgname}::git+https://github.com/GeopJr/BLAHAJ.git")
sha256sums=('SKIP')

pkgver() {
	cd "${_pkgname}"
	printf "%s.r%s.%s" "$(git describe --tags --abbrev=0 | sed 's/^v//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build () {
	cd "${_pkgname}"
	CRYSTAL_CACHE_DIR=crystal make build_mt
}

check () {
	cd "${_pkgname}"
	CRYSTAL_CACHE_DIR=crystal make test_mt
}

package() {
	cd "${_pkgname}"
	make PREFIX=/usr DESTDIR="${pkgdir}" install

	install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm 644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
}