#!/bin/bash
+# Global input variables:
+# PACKAGE_STATUS
+#
+# Global output variables:
+# BUILD_SIZE
+# SOURCE_SIZE
+
function_exists()
{
local FUNCTION_NAME=$1
mv -v ${LFS_TMP}/${DECOMPRESSED_DIRNAME} ${LFS_TMP}/${PACKAGE}
fi
- # Displaying package source size in log file
- echo " Source size:" $(du -h -s ${LFS_TMP}/${PACKAGE} | awk '{ print $1 }') 1>> ${LFS_LOG_FILE}
+ # Saving package source size in global variable.
+ SOURCE_SIZE=$(du -h -s ${LFS_TMP}/${PACKAGE} | awk '{ print $1 }')
# Removing old build directory (if any)
if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then
# Make sure to return to scripts directory
cd ${SCRDIR}
- # Displaying package build size in log file
- BUILD_SIZE=$(du -h -s -c ${LFS_TMP}/${PACKAGE} ${LFS_TMP}/${PACKAGE}-build | grep total | awk '{ print $1 }')
- echo " Build size : ${BUILD_SIZE}" 1>> ${LFS_LOG_FILE}
+ 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
+ # 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
}
else
# Use default script name
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}"
--cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache"
fi
- if [ "x${IPKG_MODE}" != "xnoac" ]; then
+ if [ -x ${LFS_TMP}/${PACKAGE}/configure ]; then
# Add option --disable-dependency-tracking if supported
if cat ${LFS_TMP}/${PACKAGE}/configure | \
grep -q "disable-dependency-tracking"; then