CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
src/pkgmk.conf: production version, not mine.
[pkgutils-cross.git] / pkgadd-cross
index 8ecac21927a0dbb003b7c823001650f6b551e8de..8d68c81648a2cf644936046333224b0eaaec038a 100755 (executable)
@@ -3,6 +3,7 @@
 TOPDIR="$(cd $(dirname $(which $0)); pwd)"
 
 PKGADD=$TOPDIR/src/pkgadd
+PKGADD_CONF=$TOPDIR/src/pkgadd.conf
 PKGMK_CONF=$TOPDIR/src/pkgmk.conf
 . $PKGMK_CONF
 
@@ -12,10 +13,11 @@ if [ -z "$CLFS" ]; then
   exit 1
 fi
 
-$PKGADD -r $CLFS $@
+if [ ! -f $CLFS/var/lib/pkg/db ]; then
+  install -d -m 0755 $CLFS/var/lib/pkg
+  touch $CLFS/var/lib/pkg/db
+fi
 
-# we shoudl avoid .la files when crosscompiling, these files
-# contains the libdir variable hardcoded which is used by libtool
-[ $? -eq 0 ] && find $CLFS -type f -name '*.la' -delete
+$PKGADD -c $PKGADD_CONF -r $CLFS $@
 
 # End of file