#!/bin/bash
-PKGUTILS_PATH=/devel/crux-arm/pkgutils-cross
+ENVIROMENT_PATH=/devel/crux-arm
+DEVTOOLS_PATH=$ENVIROMENT_PATH/devtools
+PKGUTILS_PATH=$ENVIROMENT_PATH/pkgutils-cross
export PATH=$PATH:$PKGUTILS_PATH
-PKGMK_CONF=$PKGUTILS_PATH/src/pkgmk.conf
+PKGMK_CONF=$PKGUTILS_PATH/pkgmk-cross.conf
. $PKGMK_CONF
-
-for port in $(getBuildOrder.sh); do
+for port in $($DEVTOOLS_PATH/getBuildOrder.sh); do
+ # skip ports we don't include in our tree
+ [ ! -d "${port}" ] && continue
# if package is previously installed
[ ! -z "$(pkginfo-cross -i | grep "$port ")" ] && continue
[ ! -f "${port}/Pkgfile" ] && exit 1
cd $port || exit 1
( fakeroot pkgmk-cross -d 2>&1 | tee pkgmk.log ) || exit 1
if [ ! -z "$PKGMK_PACKAGE_DIR" ]; then
- PACKAGE="$PKGMK_PACKAGE_DIR/${name}#${version}-${release}.pkg.tar.gz"
+ PACKAGE="$PKGMK_PACKAGE_DIR/${name}#${version}-${release}.pkg.tar.$PKGMK_COMPRESSION_MODE"
else
- PACKAGE="${name}#${version}-${release}.pkg.tar.gz"
+ PACKAGE="${name}#${version}-${release}.pkg.tar.$PKGMK_COMPRESSION_MODE"
fi
- ( sudo pkgadd-cross $PACKAGE || sudo pkgadd-cross -f $PACKAGE ) || exit 1
+ ( fakeroot pkgadd-cross $PACKAGE || fakeroot pkgadd-cross -f $PACKAGE ) || exit 1
cd - || exit 1
done