summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a154a3575e1916057ee57d214179115903c9dd01 (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
# AUR Package Maintainer: f1reflyylmao <f1refy@airmail.cc>
# Author: Fatih Kadir Akın <f@users.noreply.github.com>
pkgname=guardian-git
pkgver=v0.0.5.4.g54d535d
pkgrel=1
pkgdesc="Watches over your files and runs assigned tasks"
arch=('any')
url="https://github.com/f/guardian"
license=('MIT')
makedepends=('git' 'crystal')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/f/guardian.git')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	echo $(git describe --long --tags | tr '-' '.')
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	crystal build --release src/guardian.cr
}

check() {
	cd "$srcdir/${pkgname%-git}"
	crystal spec
}

package() {
	cd "$srcdir/${pkgname%-git}"
	mkdir -p "$pkgdir/usr/bin/"
	cp "$srcdir/guardian/guardian" "$pkgdir/usr/bin/guardian"
}