summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 911d388dd6909be7aa21f269f06674723f1556ac (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
40
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>

pkgname=untree
pkgver=0.9.9
pkgrel=1
pkgdesc='Inverts tree diagrams back to directory structures'
arch=('x86_64')
url='https://github.com/codeinred/untree'
license=('MIT')
depends=('gcc-libs')
makedepends=('cargo' 'git')
source=("$pkgname::git+$url#tag=v$pkgver?signed")
sha256sums=('SKIP')
validpgpkeys=('C5E8A4C01F5A0F9E7E65C0FB7F67C72ED1182321') ## Alecto Irene Perez

prepare() {
	cd "$pkgname"
	cargo update
	cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cd "$pkgname"
	cargo build --frozen --release --all-features
}

check() {
	export RUSTUP_TOOLCHAIN=stable
	cd "$pkgname"
	cargo test --frozen --all-features
}

package() {
	cd "$pkgname"
	install -D "target/release/$pkgname" -t "$pkgdir/usr/bin/"
	install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}