CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
buildAllPackages.sh: Updates and fixes: master
authorVictor Martinez <pitillo@ono.com>
Thu, 19 May 2016 11:28:50 +0000 (11:28 +0000)
committerVictor Martinez <pitillo@ono.com>
Thu, 19 May 2016 11:28:50 +0000 (11:28 +0000)
- Added j_v patch to skip ports not included in crossrootfs tree
- Fixed pkgmk.conf -> pkgmk-cross.conf
- Added var to manage packages extensions

buildAllPackages.sh

index 5dd90e2e249631b4f97f070a778b97d6c5f5de0c..a360fad4ec9975d1485967562a6227670ac3245e 100755 (executable)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
 #!/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
 
 export PATH=$PATH:$PKGUTILS_PATH
 
-PKGMK_CONF=$PKGUTILS_PATH/src/pkgmk.conf
+PKGMK_CONF=$PKGUTILS_PATH/pkgmk-cross.conf
 . $PKGMK_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
   # if package is previously installed
   [ ! -z "$(pkginfo-cross -i | grep "$port ")" ] && continue
   [ ! -f "${port}/Pkgfile" ] && exit 1
@@ -15,11 +18,11 @@ for port in $(getBuildOrder.sh); do
   cd $port || exit 1
   ( fakeroot pkgmk-cross -d 2>&1 | tee pkgmk.log ) || exit 1
   if [ ! -z "$PKGMK_PACKAGE_DIR" ]; then
   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
   else
-    PACKAGE="${name}#${version}-${release}.pkg.tar.gz"
+    PACKAGE="${name}#${version}-${release}.pkg.tar.$PKGMK_COMPRESSION_MODE"
   fi
   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 
 
   cd - || exit 1
 done