|
| 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="MULTICALL=y PROFILE=release" |
| 8 | +make_install_args="MULTICALL=y PROFILE=release" |
| 9 | +hostmakedepends="cargo pkg-config" |
| 10 | +makedepends="oniguruma-devel rust-std" |
| 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 | +alternatives=" |
| 18 | + hostname:hostname:/usr/bin/hostname-coreutils |
| 19 | + hostname:hostname.1:/usr/share/man/man1/hostname-coreutils.1" |
| 20 | +conflicts="coreutils" |
| 21 | +replaces="coreutils>=0" |
| 22 | + |
| 23 | +if [ "$CROSS_BUILD" ]; then |
| 24 | + hostmakedepends+=" oniguruma-devel" |
| 25 | +fi |
| 26 | + |
| 27 | +make_check=no # tests fail in chroot |
| 28 | + |
| 29 | +# Failed tests: |
| 30 | +# test_chgrp::basic_succeeds |
| 31 | +# test_chgrp::test_big_p |
| 32 | +# test_chgrp::test_from_option |
| 33 | +# test_chgrp::test_from_with_invalid_group |
| 34 | +# test_chgrp::test_from_with_reference |
| 35 | +# test_chgrp::test_numeric_group_formats |
| 36 | +# test_chgrp::test_reference |
| 37 | +# test_chgrp::test_subdir_permission_denied |
| 38 | +# test_chgrp::test_traverse_symlinks |
| 39 | +# test_chown::test_big_p |
| 40 | +# test_cp::test_cp_r_symlink |
| 41 | +# test_df::test_file_column_width_if_filename_contains_unicode_chars |
| 42 | +# test_df::test_nonexistent_file |
| 43 | +# test_df::test_output_file_specific_files |
| 44 | +# test_df::test_output_mp_repeat |
| 45 | +# test_df::test_output_option_without_equals_sign |
| 46 | +# test_df::test_total_label_in_correct_column |
| 47 | +# test_df::test_type_option_with_file |
| 48 | +# test_groups::test_groups |
| 49 | +# test_hostname::test_hostname_ip |
| 50 | +# test_id::test_id_default_format |
| 51 | +# test_id::test_id_ignore |
| 52 | +# test_id::test_id_name |
| 53 | +# test_id::test_id_no_specified_user |
| 54 | +# test_id::test_id_no_specified_user_posixly |
| 55 | +# test_id::test_id_real |
| 56 | +# test_id::test_id_zero |
| 57 | +# test_ls::test_ls_allocation_size |
| 58 | +# test_stat::test_mount_point_basic |
| 59 | +# test_stat::test_mount_point_combined_with_other_specifiers |
| 60 | +# test_stat::test_multi_files |
| 61 | +# test_stat::test_normal_format |
| 62 | +# test_stat::test_percent_escaping |
| 63 | +# test_stat::test_printf |
| 64 | +# test_stat::test_symlinks |
| 65 | +# test_stdbuf::test_libstdbuf_preload |
| 66 | +# test_stdbuf::test_stdbuf_line_buffered_stdout |
| 67 | +# test_stdbuf::test_stdbuf_no_fork_regression |
| 68 | +# test_stdbuf::test_stdbuf_non_utf8_paths |
| 69 | +# test_stdbuf::test_stdbuf_trailing_var_arg |
| 70 | +# test_stdbuf::test_stdbuf_unbuffered_stdout |
| 71 | +# test_test::test_file_not_owned_by_egid |
| 72 | +# test_test::test_file_not_owned_by_euid |
| 73 | +# test_touch::test_touch_system_fails |
| 74 | +# test_who::test_boot |
| 75 | + |
| 76 | +export SKIP_UTILS="more kill uptime" # conflict with util-linux and procps-ng |
| 77 | + |
| 78 | +pre_build() { |
| 79 | + # Remove cargo config target overrides |
| 80 | + rm .cargo/config.toml |
| 81 | + # Prevent cross-sysroot poisoning when building host tools for documentation |
| 82 | + vsed -i 's/@unset CARGO_BUILD_TARGET/& \&\& unset RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS CPPFLAGS/' GNUmakefile |
| 83 | +} |
| 84 | + |
| 85 | +post_install() { |
| 86 | + mv ${DESTDIR}/usr/bin/hostname ${DESTDIR}/usr/bin/hostname-coreutils |
| 87 | + mv ${DESTDIR}/usr/share/man/man1/hostname.1 ${DESTDIR}/usr/share/man/man1/hostname-coreutils.1 |
| 88 | + vlicense LICENSE |
| 89 | +} |
0 commit comments