$PKGADD -c $PKGADD_CONF -r $CLFS $ARGS
+# we need to adjust .la files for our temporary root filesystem tree (CLFS)
+if [ $? -eq 0 ]; then
+ LIBTOOL_FILES=$(tar tf $PATH_TO_PACKAGE | grep '.la')
+ for la_file in $LIBTOOL_FILES; do
+ sed -e "s|libdir='/|libdir='$CLFS/|" -i $CLFS/$la_file
+ done
+fi
+
# End of file
# /etc/pkgadd.conf: pkgadd(8) configuration
#
-# Crosscompiling rules to avoid libtool issues
-# with the hardcoded libdir variable
-INSTALL .*\.la NO
-UPGRADE .*\.la NO
-
# Default rule (implicit)
#UPGRADE ^.*$ YES