Adjust install a bit...
This commit is contained in:
parent
96bcfd346b
commit
eded54bd96
10
Makefile
10
Makefile
@ -48,10 +48,9 @@ else
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef $(prefix)
|
ifndef $(PREFIX)
|
||||||
prefix=`pwd`
|
PREFIX=`pwd`/busybox_install
|
||||||
endif
|
endif
|
||||||
BINDIR=$(prefix)
|
|
||||||
|
|
||||||
LIBRARIES=
|
LIBRARIES=
|
||||||
OBJECTS=$(shell ./busybox.sh)
|
OBJECTS=$(shell ./busybox.sh)
|
||||||
@ -69,6 +68,7 @@ busybox.links:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
- rm -f $(PROG) busybox.links *~ *.o core
|
- rm -f $(PROG) busybox.links *~ *.o core
|
||||||
|
- rm -rf busybox_install
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
- rm -f $(PROG)
|
- rm -f $(PROG)
|
||||||
@ -77,8 +77,8 @@ force:
|
|||||||
|
|
||||||
$(OBJECTS): busybox.def.h internal.h Makefile
|
$(OBJECTS): busybox.def.h internal.h Makefile
|
||||||
|
|
||||||
install: $(PROG)
|
install: busybox
|
||||||
install.sh $(BINDIR)
|
install.sh $(PREFIX)
|
||||||
|
|
||||||
whichversion:
|
whichversion:
|
||||||
@echo $(VERSION)
|
@echo $(VERSION)
|
||||||
|
17
applets/install.sh
Executable file
17
applets/install.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/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
|
||||||
|
|
10
busybox.spec
10
busybox.spec
@ -25,15 +25,7 @@ make
|
|||||||
|
|
||||||
%Install
|
%Install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT/bin
|
make PREFIX=$RPM_BUILD_ROOT install
|
||||||
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
|
|
||||||
|
|
||||||
%Clean
|
%Clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
@ -25,15 +25,7 @@ make
|
|||||||
|
|
||||||
%Install
|
%Install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT/bin
|
make PREFIX=$RPM_BUILD_ROOT install
|
||||||
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
|
|
||||||
|
|
||||||
%Clean
|
%Clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
17
install.sh
Executable file
17
install.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user