summaryrefslogtreecommitdiff
path: root/strata/build-essential/busybox.morph
blob: de5472ce24828e8928b484cc70b7c5924f264a44 (plain)
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
name: busybox
kind: chunk

configure-commands:
- make defconfig

# Avoid dividing applets between $PREFIX/[s]bin and $PREFIX/usr/[s]bin.
- '[ "$PREFIX" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' -i .config'

# None of this is needed because we have kmod; and it actually breaks the
# Linux build because depmod isn't compatible enough with util-linux's.
- sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config
- sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config
- sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config
- sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config
- sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config
- sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config

# Now turn on some little bits we do need
- sed -e 's/# CONFIG_LOCK is not set/CONFIG_LOCK=y/' -i .config
- sed -e 's/# CONFIG_NETMSG is not set/CONFIG_NETMSG=y/' -i .config

# From http://wiki.musl-libc.org/wiki/Building_Busybox
- sed -e 's/CONFIG_EXTRA_COMPAT=y/# CONFIG_EXTRA_COMPAT is not set/' -i .config
- sed -e 's/CONFIG_SELINUX=y/# CONFIG_SELINUX is not set/' -i .config
- sed -e 's/CONFIG_FEATURE_HAVE_RPC=y/# CONFIG_FEATURE_HAVE_RPC is not set/' -i .config
- sed -e 's/CONFIG_WERROR=y/# CONFIG_WERROR is not set/' -i .config
- sed -e 's/CONFIG_FEATURE_SYSTEMD=y/# CONFIG_FEATURE_SYSTEMD is not set/' -i .config
- sed -e 's/CONFIG_FEATURE_VI_REGEX_SEARCH=y/# CONFIG_FEATURE_VI_REGEX_SEARCH is not set/' -i .config
- sed -e 's/CONFIG_PAM=y/# CONFIG_PAM is not set/' -i .config
- sed -e 's/CONFIG_FEATURE_INETD_RPC=y/# CONFIG_FEATURE_INETD_RPC is not set/' -i .config
- sed -e 's/CONFIG_SELINUXENABLED=y/# CONFIG_SELINUXENABLED is not set/' -i .config
- sed -e 's/CONFIG_FEATURE_MOUNT_NFS=y/# CONFIG_FEATURE_MOUNT_NFS is not set/' -i .config

build-commands:
- make busybox

install-commands:
- |
  if [ "$PREFIX" = /usr ]; then PREFIX=; fi &&
    make CONFIG_PREFIX="$DESTDIR$PREFIX" install &&
    chmod 6755 "$DESTDIR$PREFIX"/bin/busybox