aboutsummaryrefslogblamecommitdiffstats
path: root/community/dust/APKBUILD
blob: 3bf373a5234edaff1d52488a6aa75c53fa2875f9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12


                                               
            







                                                                              




                                                      


























                                                            
            
                                                                                                                                                   
 
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=dust
pkgver=0.7.5
pkgrel=0
pkgdesc="A more intuitive version of du in Rust"
url="https://github.com/bootandy/dust"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="Apache-2.0"
makedepends="cargo"
source="https://github.com/bootandy/dust/archive/v$pkgver/dust-$pkgver.tar.gz"

case "$CARCH" in
	# Some test fail on CI builders (see #/27645).
	armhf | armv7) options="!check";;
esac

prepare() {
	default_prepare

	# Optimize binary for size (2.5 -> 1.6 MiB).
	cat >> Cargo.toml <<-EOF

		[profile.release]
		codegen-units = 1
		lto = true
		opt-level = "z"
		panic = "abort"
	EOF
}

build() {
	cargo build --release --locked
}

check() {
	cargo test --release --locked
}

package() {
	cargo install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="
22459292ed0707b33aa3eb2aba0ee3d46ce597a468e14a28e32391a33d0a591e408fab91e4154c49183544f4fb61dd41750ae4928dbe9b5e5d69714a561b8a8e  dust-0.7.5.tar.gz
"