# Make sure to return to scripts directory
cd ${SCRDIR}
- # Saving package build size in global variable
- BUILD_SIZE=$(du -h -s -c ${LFS_TMP}/${PACKAGE} ${LFS_TMP}/${PACKAGE}-build | grep total | awk '{ print $1 }')
-
- # Some scripts need to preserve the source or build directory. They can
- # do so by renaming them.
- if [ -d ${LFS_TMP}/${PACKAGE} ]; then
- # Removing source directory
- echo "Removing source directory"
- rm -rf ${LFS_TMP}/${PACKAGE}
- fi
- if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then
- # Removing build directory
- echo "Removing build directory"
- rm -rf ${LFS_TMP}/${PACKAGE}-build
+ if [ "x${DECOMPRESS}" = "x1" ]; then
+ # Saving package build size in global variable
+ BUILD_SIZE=$(du -h -s -c ${LFS_TMP}/${PACKAGE} ${LFS_TMP}/${PACKAGE}-build | grep total | awk '{ print $1 }')
+
+ # Some scripts need to preserve the source or build directory. They can
+ # do so by renaming them.
+ if [ -d ${LFS_TMP}/${PACKAGE} ]; then
+ # Removing source directory
+ echo "Removing source directory"
+ rm -rf ${LFS_TMP}/${PACKAGE}
+ fi
+ if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then
+ # Removing build directory
+ echo "Removing build directory"
+ rm -rf ${LFS_TMP}/${PACKAGE}-build
+ fi
+ else
+ BUILD_SIZE="Unknown"
fi
}
PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE})
fi
- ipkg_decompress_package
+ if [ "x${DECOMPRESS}" = "x1" ]; then
+ ipkg_decompress_package
+ else
+ SOURCE_SIZE="Unknown"
+ fi
if [ -f ${PACKAGE_DEF} ]; then
echo "Load custom package functions and definitions from ${PACKAGE_DEF}"
# Arg. #1: Package name and version (ex: gcc-4.5.1)
# Remaining arguments: Additional configure options
# Options:
+# -c Do not decompress package to ${LFS_TMP}
# -j Disable parallel make for this package
# -l Unique identification label in 'install.log'
# (default is package name and version)
START_TIME=$(echo `date +%s`)
unset ALT_SCRIPT_NAME
+
+ export DECOMPRESS="1"
export IPKG_MODE="ac" # Default mode if not specified
export HVLABEL="" # Global variable
local HVMAKE_ORIG=${HVMAKE}
- while getopts "jl:m:s:" flag ;do
+ while getopts "cjl:m:s:" flag ;do
case ${flag} in
+ c)
+ # Do not decompress package
+ DECOMPRESS="0"
+ ;;
j)
- # Disable parallel make onlyfor this package
+ # Disable parallel make only for this package
HVMAKE="make"
;;
l)
# Make sure we are at a known location
cd ${SCRDIR}
+ if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ]; then
+ # Make sure to update dynamic linker run-time bindings, except for
+ # stages 0 and 1 where we run as the LFS user.
+ ldconfig
+ fi
+
exec 1>&6 # Restore stdout.
# Displaying build time after the package name.
ipkg_trap_end
- # Make sure to update dynamic linker run-time bindings
- ldconfig
-
return $EXIT_SUCCESS
}