X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fipkg;h=8ac0a099ed8c35bc006c8deff39654103486e22e;hb=07c31a6d91d560be5e3867792186dfd4f667e6a5;hp=77f51c4d92e050f050213ef7713f532ec8822430;hpb=2b86b5b69df77007ae7fd31fc1ae39361a1a9019;p=hvlinux.git diff --git a/functions/ipkg b/functions/ipkg index 77f51c4..8ac0a09 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -97,20 +97,24 @@ ipkg_finish() # 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 } @@ -126,7 +130,11 @@ ipkg_script() 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}" @@ -164,6 +172,20 @@ ipkg_script() ${CONFIGURE_OPTS} \ --disable-dependency-tracking" fi + + # Remove option --sysconfdir=... if not supported + if ! cat ${LFS_TMP}/${PACKAGE}/configure | \ + grep -q "sysconfdir"; then + # Split on space, one per line. + # Remove line --sysconfdir=... + # Join separate lines on one line + # Remove trailing space + CONFIGURE_OPTS=$(echo ${CONFIGURE_OPTS} | \ + tr -s " " "\n" | \ + grep -v "\-\-sysconfdir=" | \ + tr -s "\n" " " | \ + sed "s/ $//") + fi fi ipkg_display_build_infos