diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-22 17:06:29 +0000 |
---|---|---|
committer | Super user <root@baserock.(none)> | 2012-09-17 13:11:38 +0000 |
commit | 9536e332f626f3326f74e723269a1bf5e28229e0 (patch) | |
tree | 06c3e1b307aae8f8b750022caa9b6a3bc4675e89 | |
parent | 58ec98320978d728b71e0892482162c7d98cf1e8 (diff) | |
download | busybox-9536e332f626f3326f74e723269a1bf5e28229e0.tar.gz |
busybox.morph: if PREFIX=/usr, allow the split
The usual file layout is that some programs are installed into
/usr/bin and some are installed into /bin.
If an unusual prefix is used the split isn't wanted, but when
the prefix is /usr then the split is usually desired.
So disable the /usr split when PREFIX isn't /usr, otherwise
you get paths like $PREFIX/usr/bin/env, which can be /tools/usr/bin/env
Also if PREFIX=/usr we don't want to install to /usr/usr/bin, so
don't include PREFIX in the destination.
-rw-r--r-- | busybox.morph | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/busybox.morph b/busybox.morph index 493fa2016..4508a1ed3 100644 --- a/busybox.morph +++ b/busybox.morph @@ -11,15 +11,14 @@ "sed -e 's/.*FEATURE_PREFER_APPLETS=.*/# CONFIG_FEATURE_PREFER_APPLETS is not set/' -i .config", "sed -e 's/.*FEATURE_MOUNT_CIFS=.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' -i .config", "sed -e 's|.*UDHCPC_DEFAULT_SCRIPT=.*|CONFIG_UDHCPC_DEFAULT_SCRIPT=\"'\"$PREFIX\"/share/udhcpc/default.script'\"|' -i .config", - "sed -e 's/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/' -i .config", + "[ \"$PREFIX\" = /usr ] || sed -e 's/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/' -i .config", "sed -e 's/.*CONFIG_AWK=.*/# CONFIG_AWK is not set/' -i .config" ], "build-commands": [ "make" ], "install-commands": [ - "make CONFIG_PREFIX=\"$DESTDIR$PREFIX\" install", - "chmod 6755 \"$DESTDIR$PREFIX\"/bin/busybox", + "if [ \"$PREFIX\" = /usr ]; then PREFIX=; fi && make CONFIG_PREFIX=\"$DESTDIR$PREFIX\" install && chmod 6755 \"$DESTDIR$PREFIX\"/bin/busybox", "mkdir -p \"$DESTDIR\"/etc", "cp examples/mdev_fat.conf \"$DESTDIR\"/etc/mdev.conf", "install -d \"$DESTDIR$PREFIX\"/share/udhcpc", |