summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5939c17a62fdfd60296bea174005942eb3deac18 (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: Vedant K <gamemaker0042 at gmail dot com>
# Note that this package was previously named dirstat-git.

_pkgname=dirstat-rs
pkgname=dirstat-rs-git
pkgver=r48.1d7bb8a
pkgrel=2
pkgdesc="A disk usage cli, similar to windirstat"
arch=('x86_64')
url="https://github.com/scullionw/dirstat-rs"
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'cargo')
provides=("$_pkgname")

_branch='master'
source=("$_pkgname::git+https://github.com/scullionw/dirstat-rs.git")
sha256sums=('SKIP')

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

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

build() {
	cd "$srcdir/$_pkgname"
	
	cargo build --release
}

package() {
	cd "$srcdir/$_pkgname"
	
	install -Dm755 target/release/ds "$pkgdir/usr/bin/ds"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}