mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-07 14:52:31 +02:00
72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
# Maintainer: omni <omni+alpine@hack.org>
|
|
pkgname=uutils-coreutils
|
|
_pkgname=coreutils
|
|
pkgver=0.0.27
|
|
pkgrel=0
|
|
pkgdesc="coreutils rewritten in Rust"
|
|
# s390x: blocked by nix crate
|
|
arch="all !s390x"
|
|
url="https://github.com/uutils/coreutils"
|
|
license="MIT"
|
|
makedepends="cargo help2man oniguruma-dev cargo-auditable"
|
|
checkdepends="coreutils" # test_ls.rs incompatible with busybox truncate
|
|
subpackages="$pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/uutils/coreutils/archive/$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
options="!check" # package builder file descriptor issues
|
|
|
|
export RUSTONIG_DYNAMIC_LIBONIG=1
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo auditable build --frozen \
|
|
--profile=release-small --features=feat_os_unix_musl
|
|
|
|
mkdir bin
|
|
cp target/release-small/"$_pkgname" bin/uutils
|
|
|
|
mkdir man1
|
|
help2man --no-info --name=uutils --manual=uutils \
|
|
--version-string="$pkgver" bin/uutils > man1/uutils.1
|
|
|
|
# create symlinks and individual man pages
|
|
for uutil in $(./bin/uutils | tail -n +7 | tr -d '\n' | sed -e 's/,//g' -e 's/sha3-\s*512sum/sha3-512sum/'); do
|
|
ln -s uutils bin/uutils-$uutil
|
|
case "$uutil" in
|
|
test) ;; # helpless
|
|
\[) help2man --no-info --name=uutils-test --manual=uutils \
|
|
bin/uutils-"$uutil" > man1/uutils-test.1 ;;
|
|
uniq) help2man --no-info --name=uutils-"$uutil" --manual=uutils \
|
|
--no-discard-stderr \
|
|
bin/uutils-"$uutil" > man1/uutils-"$uutil".1 ;;
|
|
*) help2man --no-info --name=uutils-"$uutil" --manual=uutils \
|
|
bin/uutils-"$uutil" > man1/uutils-"$uutil".1 ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
check() {
|
|
ulimit -n 4096 # running out of file descriptors
|
|
|
|
cargo test --frozen \
|
|
--profile=release-small --features=feat_os_unix_musl
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/usr
|
|
mv bin "$pkgdir"/usr
|
|
|
|
mkdir -p "$pkgdir"/usr/share/man
|
|
mv man1 "$pkgdir"/usr/share/man
|
|
install -Dm0644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
|
|
}
|
|
|
|
sha512sums="
|
|
e798a14a9d24b2ff857588336e4035817445850a1ed5216b1fa5b876082eb0693c7ae535d0106a7aab95690eb0369481308e877f60e39ae67a38b048e73574bd uutils-coreutils-0.0.27.tar.gz
|
|
"
|