summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 351dac5ecb3929fe0e6c63e9a3346d0852ff6f9a (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: Emilio Reggi <nag@mailbox.org>
pkgname=himalaya-git
_pkgname=himalaya
pkgver=r167.9d40a7d
pkgrel=2
pkgdesc="Minimalist CLI email client, written in Rust."
arch=('any')
url="https://github.com/soywod/himalaya"
license=('BSD')
depends=('gcc-libs' 'openssl')
makedepends=('cargo' 'git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}"::"git+${url}")
md5sums=('SKIP')

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

build() {
	cd "$_pkgname"
	RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
}

check() {
   cd "$_pkgname"
   RUSTUP_TOOLCHAIN=stable cargo test --release --locked --lib --target-dir=target
}

package() {
   cd "$_pkgname"
   install -Dm 755 target/release/${_pkgname} -t "${pkgdir}/usr/bin"
   install -Dm 644 README.md -t "$pkgdir/usr/share/doc/${_pkgname}"
   install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/${_pkgname}"
}