name=starship
version=1.24.0
release=1
desc="Cross-shell prompt"
url="https://starship.rs/"
license="ISC"
depend="glibc"
makedepend="rust cargo"
source="https://github.com/starship/starship/archive/refs/tags/v1.24.0.tar.gz"
sha256="SKIP"

build() {
	cd "starship-1.24.0"
	export CARGO_HOME="${CARGO_HOME:-/tmp/scraplinux-cargo-home}"
	cargo build --release --locked
}

package() {
	cd "starship-1.24.0"
	install -Dm755 "target/release/starship" "$pkgdir/usr/bin/starship"
	for d in README.md README LICENSE; do
		[ -f "$d" ] && install -Dm644 "$d" "$pkgdir/usr/share/doc/starship/$d"
	done
	true
}
