summaryrefslogtreecommitdiffstats
path: root/recipes/busybox
diff options
context:
space:
mode:
authorMichael Smith <msmith@cbnco.com>2009-05-25 23:35:09 -0400
committerPhil Blundell <philb@gnu.org>2009-06-03 18:34:44 +0100
commitfd7bf5842ab5f4b535ed329044706f7fc6c3e58c (patch)
tree0cb21c7f7174cd7bc2f0c0feed22b479fda96fbf /recipes/busybox
parent99c76005039ed45e4f23b08fee688e61ad73ede9 (diff)
downloadopenembedded-fd7bf5842ab5f4b535ed329044706f7fc6c3e58c.tar.gz
busybox: allow building when prefix is "", not "/usr".
There was code to handle this, but it needed a tweak to prevent copying a directory on top of itself. Other prefixes (besides /usr) may also work now, but this is untested. busybox will also build when base_sbindir is "/bin" instead of "/sbin". Signed-off-by: Michael Smith <msmith@cbnco.com>
Diffstat (limited to 'recipes/busybox')
-rw-r--r--recipes/busybox/busybox.inc17
1 files changed, 11 insertions, 6 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index acf47f2178..04f2cf40e6 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -62,12 +62,15 @@ do_compile() {
do_install () {
oe_runmake busybox.links
- if [ "x${layout_prefix}" = "x" ]; then
- sed 's:^/usr/:/:' < busybox.links >busybox.links.new
+ if [ "${prefix}" != "/usr" ]; then
+ sed "s:^/usr/:${prefix}/:" busybox.links > busybox.links.new
mv busybox.links.new busybox.links
- elif [ "${layout_prefix}" != "/usr" ]; then
- echo "warning, busybox.links will lose with this prefix"
fi
+ if [ "${base_sbindir}" != "/sbin" ]; then
+ sed "s:^/sbin/:${base_sbindir}/:" busybox.links > busybox.links.new
+ mv busybox.links.new busybox.links
+ fi
+
unset CFLAGS CPPFLAGS CXXFLAGS
install -d ${D}${sysconfdir}/init.d
oe_runmake "PREFIX=${D}" install
@@ -77,9 +80,11 @@ do_install () {
install -d ${D}/busybox
ls ${D} -R
- for i in ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ; do
+ # Copy /bin and /sbin -- and /usr, if prefix is not "".
+ for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
+ do
if [ -d $i ]; then
- cp -dPr $i ${D}/busybox/
+ cp -pPR $i ${D}/busybox/
fi
done
# Move the busybox binary back to /bin