Skip to content

Commit b79f4b9

Browse files
committed
New package: uutils-coreutils-0.8.0
1 parent 3004512 commit b79f4b9

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

srcpkgs/uutils-coreutils/template

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Template file for 'uutils-coreutils'
2+
pkgname=uutils-coreutils
3+
version=0.8.0
4+
revision=1
5+
build_style=gnu-makefile
6+
build_helper="rust"
7+
make_build_args="PROFILE=release PROG_PREFIX=u"
8+
make_install_args="PROFILE=release PROG_PREFIX=u"
9+
hostmakedepends="cargo pkg-config"
10+
makedepends="oniguruma-devel"
11+
short_desc="Cross-platform Rust rewrite of the GNU coreutils"
12+
maintainer="Nafis <mnabid.25@outlook.com>"
13+
license="MIT"
14+
homepage="https://github.com/uutils/coreutils"
15+
distfiles="https://github.com/uutils/coreutils/archive/refs/tags/${version}.tar.gz"
16+
checksum=03f765fd23e9cc66f8789edc6928644d8eae5e5a7962d83795739d0a8a85eaef
17+
make_check=no # test fails on chroot
18+
19+
if [ "$CROSS_BUILD" ]; then
20+
hostmakedepends+=" oniguruma-devel rust-std"
21+
fi
22+
23+
_utils="[ arch b2sum base32 base64 basename basenc cat chgrp chmod chown chroot
24+
cksum comm cp csplit cut date dd df dir dircolors dirname du echo env
25+
expand expr factor false fmt fold groups head hostid hostname id install
26+
join link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl
27+
nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd
28+
readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum
29+
sha512sum shred shuf sleep sort split stat stdbuf stty sum sync tac
30+
tail tee test timeout touch tr true truncate tsort tty uname unexpand
31+
uniq unlink users vdir wc who whoami yes"
32+
33+
for _u in $_utils; do
34+
alternatives+=" ${_u}:${_u}:/usr/bin/u${_u} ${_u}:${_u}.1:/usr/share/man/man1/u${_u}.1"
35+
done
36+
37+
# Avoid conflicts with util-linux and procps-ng
38+
export SKIP_UTILS="more kill uptime"
39+
40+
pre_build() {
41+
# Remove cargo config target overrides
42+
rm .cargo/config.toml
43+
# Prevent cross-sysroot poisoning when building host tools for documentation
44+
vsed -i 's/@unset CARGO_BUILD_TARGET/& \&\& unset RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS CPPFLAGS/' GNUmakefile
45+
}
46+
47+
post_install() {
48+
ln -s utest.1 "${DESTDIR}/usr/share/man/man1/u[.1"
49+
vlicense LICENSE
50+
}

0 commit comments

Comments
 (0)