scripts/install: (re)add 'fastinstall' support

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-11-11 17:05:47 +01:00
parent 6647a6ee14
commit 8636b090ff
3 changed files with 46 additions and 40 deletions

View File

@ -57,6 +57,9 @@ fi
# multi-processor computer (like hyperthreading SMP CPU)
CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'`
# forcing install of all packages (yes/no)
FORCE_INSTALL=no
# set jpeg library depending on ARCH
if [ "$TARGET_ARCH" = "i386" -o "$TARGET_ARCH" = "x86_64" ]; then
LIBJPEG="libjpeg-turbo"

View File

@ -43,7 +43,7 @@ TARGET_ADDONS="$TARGET_IMG/$ADDONS/$ADDON_PATH"
ADDON_BUILD="$BUILD/$ADDONS/$1"
STAMPS_NOARCH=.stamps
STAMPS=$BUILD/.stamps
INSTALLSTAMPS=$BUILD/.install
STAMPS_INSTALL=$BUILD/image/.stamps
DOCS=DOCS
TOOLCHAIN=$BUILD/toolchain
SYSROOT_PREFIX=$ROOT/$TOOLCHAIN/$TARGET_NAME/sysroot

View File

@ -2,58 +2,61 @@
. config/options $1
STAMP=$STAMPS_INSTALL/$1/install
if [ -z "$1" ]; then
echo "usage: $0 package_name"
exit 1
fi
# mkdir -p $INSTALLSTAMPS/$1
# INSTALLSTAMP=$INSTALLSTAMPS/$1/install
mkdir -p $STAMPS_INSTALL/$1
# if [ $1 = "image" ]; then
# rm -rf $INSTALLSTAMPS
# mkdir -p $INSTALLSTAMPS/image
# fi
if [ -f $STAMP -a $PKG_DIR/install -nt $STAMP ]; then
rm -f $STAMP
fi
# if [ ! -f $INSTALLSTAMP ]; then
[ -f $STAMP -a $FORCE_INSTALL = "no" ] && exit 0
if [ -f $PKG_DIR/arch ]; then
grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0
grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0
fi
if [ -f $PKG_DIR/arch ]; then
grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0
grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0
fi
if [ -f $PKG_DIR/platform ]; then
grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0
grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0
fi
if [ -f $PKG_DIR/platform ]; then
grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0
grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0
fi
if [ -d $PKG_DIR/init.d ]; then
mkdir -p $INSTALL/etc/init.d
cp $PKG_DIR/init.d/* $INSTALL/etc/init.d/
fi
if [ -d $PKG_DIR/init.d ]; then
mkdir -p $INSTALL/etc/init.d
cp $PKG_DIR/init.d/* $INSTALL/etc/init.d/
fi
if [ -d $PKG_DIR/profile.d ]; then
mkdir -p $INSTALL/etc/profile.d
cp $PKG_DIR/profile.d/*.conf $INSTALL/etc/profile.d/
fi
if [ -d $PKG_DIR/profile.d ]; then
mkdir -p $INSTALL/etc/profile.d
cp $PKG_DIR/profile.d/*.conf $INSTALL/etc/profile.d/
fi
if [ -d $PKG_DIR/init.network ]; then
mkdir -p $INSTALL/etc/init.d/network
cp $PKG_DIR/init.network/* $INSTALL/etc/init.d/network/
fi
if [ -d $PKG_DIR/init.network ]; then
mkdir -p $INSTALL/etc/init.d/network
cp $PKG_DIR/init.network/* $INSTALL/etc/init.d/network/
fi
$SCRIPTS/build $@
printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT
#dialog --infobox "%${INDENT}c INSTALL $1\n" 15 40
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
$SCRIPTS/build $@
printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
for p in $PKG_DEPENDS; do
$SCRIPTS/install $p
done
for p in $PKG_DEPENDS; do
$SCRIPTS/install $p
done
if [ -f $PKG_DIR/install ]; then
$PKG_DIR/install $@ >&$VERBOSE_OUT
fi
if [ -f $PKG_DIR/install ]; then
$PKG_DIR/install $@ >&$VERBOSE_OUT
fi
# touch $INSTALLSTAMP
# fi
. $PROJECT_DIR/$PROJECT/options
for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do
eval val=\$$i
echo "STAMP_$i=\"$val"\" >> $STAMP
done