endif
-ifndef $(prefix)
- prefix=`pwd`
+ifndef $(PREFIX)
+ PREFIX=`pwd`/busybox_install
endif
-BINDIR=$(prefix)
LIBRARIES=
OBJECTS=$(shell ./busybox.sh)
clean:
- rm -f $(PROG) busybox.links *~ *.o core
+ - rm -rf busybox_install
distclean: clean
- rm -f $(PROG)
$(OBJECTS): busybox.def.h internal.h Makefile
-install: $(PROG)
- install.sh $(BINDIR)
+install: busybox
+ install.sh $(PREFIX)
whichversion:
@echo $(VERSION)
--- /dev/null
+#!/bin/sh
+
+if [ "$1" == "" ]; then
+ echo "No installation directory. aborting."
+ exit 1;
+fi
+
+h=`cat busybox.links`
+
+mkdir -p $1/bin
+for i in $h ; do
+ mkdir -p $1/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
+ (cd $1/bin ; ln -s busybox `echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' ` )
+done
+rm -f $1/bin/busybox
+install -m 755 busybox $1/bin/busybox
+
%Install
rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/bin
-h=`cat busybox.links`
-
-for i in $h ; do
- mkdir -p $RPM_BUILD_ROOT/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
- (cd $RPM_BUILD_ROOT/bin ; ln -s busybox `echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' ` );
-done
-rm -f $RPM_BUILD_ROOT/bin/busybox
-install -m 755 busybox $RPM_BUILD_ROOT/bin/busybox
+make PREFIX=$RPM_BUILD_ROOT install
%Clean
rm -rf $RPM_BUILD_ROOT
%Install
rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/bin
-h=`cat busybox.links`
-
-for i in $h ; do
- mkdir -p $RPM_BUILD_ROOT/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
- (cd $RPM_BUILD_ROOT/bin ; ln -s busybox `echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' ` );
-done
-rm -f $RPM_BUILD_ROOT/bin/busybox
-install -m 755 busybox $RPM_BUILD_ROOT/bin/busybox
+make PREFIX=$RPM_BUILD_ROOT install
%Clean
rm -rf $RPM_BUILD_ROOT
--- /dev/null
+#!/bin/sh
+
+if [ "$1" == "" ]; then
+ echo "No installation directory. aborting."
+ exit 1;
+fi
+
+h=`cat busybox.links`
+
+mkdir -p $1/bin
+for i in $h ; do
+ mkdir -p $1/`echo $i | sed -e 's/\(^.*\/\)\(.*\)/\1/g' `
+ (cd $1/bin ; ln -s busybox `echo $i | sed -e 's/\(^.*\/\)\(.*\)/\2/g' ` )
+done
+rm -f $1/bin/busybox
+install -m 755 busybox $1/bin/busybox
+