summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ee4cab7340e8a0a0cbaeda09951f70a4d391871 (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
# Maintainer: Luis Martinez <luis dot martinez at tuta dot io>
# Contributor: Wesley Moore <wes@wezm.net>

pkgname=dutree-git
_pkgname=${pkgname%-git}
pkgver=0.2.18.r0.g44e877d
pkgrel=2
pkgdesc='A tool to analyze file system usage written in Rust'
arch=('x86_64')
url='https://github.com/nachoparker/dutree'
license=('GPL3')
depends=('gcc-libs')
makedepends=('git' 'cargo')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$pkgname::git+$url")
sha256sums=('SKIP')

pkgver()  {
  cd "$pkgname"
  git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
  cd "$pkgname"
  cargo build --release --locked
}

check() {
  cd "$pkgname"
  cargo test --release --locked
}

package() {
  cd "$pkgname"
  install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}