This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plan.sh
69 lines (63 loc) · 1.89 KB
/
plan.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
pkg_name=coreutils
_distname=$pkg_name
pkg_origin=core
pkg_version=8.32
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_description="\
The GNU Core Utilities are the basic file, shell and text manipulation \
utilities of the GNU operating system. These are the core utilities which are \
expected to exist on every operating system.\
"
pkg_upstream_url="https://www.gnu.org/software/coreutils/"
pkg_license=('GPL-3.0')
pkg_source="http://ftp.gnu.org/gnu/$_distname/${_distname}-${pkg_version}.tar.xz"
pkg_shasum="4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa"
pkg_deps=(
core/glibc
core/acl
core/attr
core/gmp
core/libcap
)
pkg_build_deps=(
core/patch
core/make
core/gcc
core/m4
core/perl
core/diffutils
)
pkg_bin_dirs=(bin)
pkg_interpreters=(bin/env)
do_prepare() {
_patch_files
}
do_build() {
# The `FORCE_` variable allows the software to compile with the root user,
# and the `--enable-no-install-program` flag skips installation of binaries
# that are provided by other pacakges.
FORCE_UNSAFE_CONFIGURE=1 ./configure \
--prefix="$pkg_prefix" \
--enable-no-install-program=kill,uptime
make
}
do_check() {
make NON_ROOT_USERNAME=nobody check-root
make RUN_EXPENSIVE_TESTS=yes check
}
_patch_files() {
patch -p1 < "$PLAN_CONTEXT/skip-tests.patch"
}
# ----------------------------------------------------------------------------
# **NOTICE:** What follows are implementation details required for building a
# first-pass, "stage1" toolchain and environment. It is only used when running
# in a "stage1" Studio and can be safely ignored by almost everyone. Having
# said that, it performs a vital bootstrapping process and cannot be removed or
# significantly altered. Thank you!
# ----------------------------------------------------------------------------
if [[ "$STUDIO_TYPE" = "stage1" ]]; then
pkg_build_deps=(
core/gcc
core/m4
)
fi