summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/Makefile.in7
-rw-r--r--applets/applets.c2
-rw-r--r--applets/busybox.c2
-rwxr-xr-xapplets/install.sh19
4 files changed, 24 insertions, 6 deletions
diff --git a/applets/Makefile.in b/applets/Makefile.in
index 511652a..80b6da0 100644
--- a/applets/Makefile.in
+++ b/applets/Makefile.in
@@ -10,8 +10,11 @@ APPLETS_DIR:=$(top_builddir)/applets/
endif
srcdir=$(top_srcdir)/applets
-APPLET_SRC:=applets.c busybox.c
-APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
+APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c)
+APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
+
+APPLET_SRC-y+=$(APPLET_SRC)
+APPLET_SRC-a+=$(APPLET_SRC)
libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
diff --git a/applets/applets.c b/applets/applets.c
index dde75f2..de1a871 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -265,7 +265,7 @@ static void parse_config_file(void)
}
/* Now get the the user/group info. */
-
+
s = (char *) bb_skip_whitespace(e);
/* Note: We require whitespace between the mode and the
diff --git a/applets/busybox.c b/applets/busybox.c
index 90ea2bd..3d7a0fd 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -11,7 +11,7 @@
#define setlocale(x,y)
#endif
-const char *bb_applet_name;
+const char *bb_applet_name __attribute__((externally_visible));
#ifdef CONFIG_FEATURE_INSTALLER
/*
diff --git a/applets/install.sh b/applets/install.sh
index 2fcd2ae..cc6c1fa 100755
--- a/applets/install.sh
+++ b/applets/install.sh
@@ -3,8 +3,8 @@
export LC_ALL=POSIX
export LC_CTYPE=POSIX
-prefix=$1
-if [ "$prefix" = "" ]; then
+prefix=${1}
+if [ -z "$prefix" ]; then
echo "No installation directory, aborting."
exit 1;
fi
@@ -16,7 +16,22 @@ case "$2" in
*) echo "Unknown install option: $2"; exit 1;;
esac
+if [ "$DO_INSTALL_LIBS" != "n" ]; then
+ # get the target dir for the libs
+ # This is an incomplete/incorrect list for now
+ case $(uname -m) in
+ x86_64|ppc64*|sparc64*|ia64*|hppa*64*) libdir=/lib64 ;;
+ *) libdir=/lib ;;
+ esac
+ mkdir -p $prefix/$libdir || exit 1
+ for i in $DO_INSTALL_LIBS; do
+ rm -f $prefix/$libdir/$i || exit 1
+ if [ -f $i ]; then
+ install -m 644 $i $prefix/$libdir/ || exit 1
+ fi
+ done
+fi
rm -f $prefix/bin/busybox || exit 1
mkdir -p $prefix/bin || exit 1
install -m 755 busybox $prefix/bin/busybox || exit 1