CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkginfo-cross: removed not need pkginfo specification.
[pkgutils-cross.git] / pkgadd-cross
index 564410cda07b856f76081499313408d45876f20d..d780311818e27a9481724d7d495bd6c4f70a7dd9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-TOPDIR="$(cd $(dirname $0); pwd)"
+TOPDIR="$(cd $(dirname $(which $0)); pwd)"
 
 PKGADD=$TOPDIR/src/pkgadd
 PKGMK_CONF=$TOPDIR/src/pkgmk.conf
@@ -12,6 +12,15 @@ if [ -z "$CLFS" ]; then
   exit 1
 fi
 
+if [ ! -f $CLFS/var/lib/pkg/db ]; then
+  install -d -m 0755 $CLFS/var/lib/pkg
+  touch $CLFS/var/lib/pkg/db
+fi
+
 $PKGADD -r $CLFS $@
 
+# 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
+
 # End of file