summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a56f0495100eeeff85ebba05378c2281922aa0f2 (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

# Maintainer: Andrea Feletto <andrea@andreafeletto.com>

pkgname=heliocron-git
_pkgname=${pkgname%-*}
pkgver=0.7.0.r0.g19ea49a
pkgrel=1
pkgdesc='Execute tasks relative to sunset, sunrise and other solar events.'
arch=('x86_64')
url="https://github.com/mfreeborn/$_pkgname"
license=('Apache' 'MIT')
provides=('heliocron')
conflicts=('heliocron-bin')
makedepends=('cargo')
source=("git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname"

	git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
	cd "$srcdir/$_pkgname"

	RUSTUP_TOOLCHAIN=stable cargo build --release --locked --target-dir=target
}

package() {
	cd "$srcdir/$_pkgname"

	install -Dm755 "target/release/$_pkgname" -t "$pkgdir/usr/bin"
	install -Dm644 'LICENSE-APACHE' -t "$pkgdir/usr/share/licenses/$_pkgname"
	install -Dm644 'LICENSE-MIT' -t "$pkgdir/usr/share/licenses/$_pkgname"
	install -Dm644 'README.md' -t "$pkgdir/usr/share/doc/$_pkgname"
}