mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
this does not download deps that won't be used for the default build target (the ctarget we are building for implicitly). this makes quite a few fetches faster.. because a ton of crates download a 10mb "windows-sys" that is never used, amongst other things. maybe breaks a thing or two.
46 lines
1.2 KiB
Text
46 lines
1.2 KiB
Text
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=nsh
|
|
pkgver=0.4.2
|
|
pkgrel=0
|
|
pkgdesc="A command-line shell like fish, but POSIX compatible"
|
|
url="https://github.com/nuta/nsh"
|
|
arch="aarch64 armhf armv7 ppc64le x86 x86_64" # limited by rust/cargo
|
|
license="CC0-1.0 OR MIT"
|
|
# bash is needed for completion
|
|
depends="bash"
|
|
checkdepends="python3 py3-termcolor"
|
|
makedepends="cargo"
|
|
install="$pkgname.post-install $pkgname.pre-deinstall"
|
|
subpackages="$pkgname-dbg"
|
|
source="https://github.com/nuta/nsh/archive/v$pkgver/nsh-$pkgver.tar.gz"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Optimize for size (1.9 -> 1.4 MiB).
|
|
sed -i 's/^opt-level\s*=.*/opt-level = "z"/' Cargo.toml
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --release --frozen
|
|
}
|
|
|
|
check() {
|
|
# Disabled due to: "`![feature]` may not be used on the stable release channel`"
|
|
#cargo test --frozen
|
|
|
|
# Integration tests
|
|
./test.py
|
|
}
|
|
|
|
package() {
|
|
cargo install --locked --offline --path . --root="$pkgdir/usr"
|
|
rm "$pkgdir"/usr/.crates*
|
|
}
|
|
|
|
sha512sums="
|
|
5b8e4b27526c567c12e79b1583b5036a2c28aca4bb58256f2d66714c37d4b89cfb77ec1c8124602b2786fbd05c52f01a12d10f7de18c548e88fe96dbbf5d7615 nsh-0.4.2.tar.gz
|
|
"
|