[PC-BSD Commits] r5215 - in pbibuild/pbibuilder8: pbicreator scripts

svn at pcbsd.org svn at pcbsd.org
Wed Dec 2 12:55:43 PST 2009


Author: kris
Date: 2009-12-02 12:55:43 -0800 (Wed, 02 Dec 2009)
New Revision: 5215

Modified:
   pbibuild/pbibuilder8/pbicreator/createpbi.sh
   pbibuild/pbibuilder8/scripts/2.1.startmake.sh
   pbibuild/pbibuilder8/scripts/3.makepbi.sh
Log:

Updated PBI naming for 8.0 in our pbibuilder software



Modified: pbibuild/pbibuilder8/pbicreator/createpbi.sh
===================================================================
--- pbibuild/pbibuilder8/pbicreator/createpbi.sh	2009-12-02 20:53:12 UTC (rev 5214)
+++ pbibuild/pbibuilder8/pbicreator/createpbi.sh	2009-12-02 20:55:43 UTC (rev 5215)
@@ -82,6 +82,11 @@
  echo "ProgSize: $PBISIZE" >> ${WORKDIR}/PkgConfig
 fi
 
+# Figure out the PBI name for the /Programs/<progname> 
+cat ${PBCFILE} | grep '^ProgName:' | cut -d ' ' -f 2-10 >${WORKDIR}/.s1
+sed -e "s, ,,g" ${WORKDIR}/.s1 > ${WORKDIR}/.s2
+TMPNAME="`cat ${WORKDIR}/.s2`"
+PBIPROGDIR="${TMPNAME}"
 
 # Check if we need to include the license file
 cat ${PBCFILE} | grep '^License: YES' >/dev/null
@@ -115,10 +120,10 @@
 then
   echo -e "Populating libraries...\t\c"
   
-  # Make sure the autolibs directory is made in the PBI folder 
-  mkdir "${PBILOC}/autolibs" >/dev/null 2>/dev/null
+  # Make sure the lib directory is made in the PBI folder 
+  mkdir "${PBILOC}/lib" >/dev/null 2>/dev/null
 
-  echo "Checking for libs in the ExePath: Variables"
+  echo "Checking for lib in the ExePath: Variables"
   # Now loop through the ExePath variables and grab the libs for each
   while read line
   do
@@ -127,7 +132,7 @@
     if [ "$?" = "0" ]
     then
        BINARY="`echo $line | grep '^ExePath:' | cut -d ' ' -f 2-5`"
-       ${PROGDIR}/PBIfiles/copylibs.sh ${PBILOC}/${BINARY} ${PBILOC}/autolibs/ ${PROGDIR}
+       ${PROGDIR}/PBIfiles/copylibs.sh ${PBILOC}/${BINARY} ${PBILOC}/lib/ ${PROGDIR}
     fi
   done < ${PBCFILE}
 
@@ -139,7 +144,7 @@
   echo "Checking binaries in $d for required libraries"
     for i in `ls ${d}`
     do
-      ${PROGDIR}/PBIfiles/copylibs.sh ${d}/${i} ${PBILOC}/autolibs/ ${PROGDIR}
+      ${PROGDIR}/PBIfiles/copylibs.sh ${d}/${i} ${PBILOC}/lib/ ${PROGDIR}
     done
   done
 
@@ -147,8 +152,9 @@
   LD_LIBRARY_OLD="${LD_LIBRARY_PATH}"
 
   # Copy the ldconfig directory over, this will be used by pbi installer when running apps 
-  rm -rf ${PBILOC}/libdata
-  cp -r /usr/local/libdata ${PBILOC}/libdata
+  rm -rf ${PBILOC}/libdata/
+  mkdir ${PBILOC}/libdata
+  cp -r /usr/local/libdata/ldconfig ${PBILOC}/libdata/
 
   # Setup our extra LIBDIRS in ldconfig
   LDCONFIGDIRS=""
@@ -160,21 +166,32 @@
     then
       LDCONFIGDIRS="${TMP}:${LDCONFIGDIRS}"
     fi
+
+    # Make sure we massage any /usr/local entries, in case we built
+    # with a /usr/local LOCALBASE
+    echo $LDCONFIGDIRS | grep "^/usr/local" >/dev/null 2>/dev/null
+    if [ "$?" = "0" ]
+    then
+      cat ${PBILOC}/libdata/ldconfig/${i} \
+      | sed -e "s|/usr/local|/Programs/${PBIPROGDIR}|g" \
+      > ${PBILOC}/libdata/ldconfig/${i}.tmp
+      mv ${PBILOC}/libdata/ldconfig/${i}.tmp ${PBILOC}/libdata/ldconfig/${i}
+    fi
   done
 
   # Make sure we parse any .so files, to find any libs they may require as well
   LIBFILES="`find ${PBILOC} -type f -print | grep '\.so$'`"
   for i in ${LIBFILES}
   do
-     file ${i} | grep "dynamically linked" >/dev/null 2>/dev/null
+     file ${i} | grep "shared object" >/dev/null 2>/dev/null
      if [ "$?" = "0" ]
      then
        echo "Checking libraries required for ${i}"
        LIBDIR="`dirname ${i}`"
-       LD_LIBRARY_PATH="${PBILOC}/autolibs:$LIBDIR:${LDCONFIGDIRS}" ; export LD_LIBRARY_PATH
+       LD_LIBRARY_PATH="${PBILOC}/lib:$LIBDIR:${LDCONFIGDIRS}" ; export LD_LIBRARY_PATH
 
        # Copy over the libs for this file now
-       ${PROGDIR}/PBIfiles/copylibs.sh ${i} ${PBILOC}/autolibs/ ${PROGDIR}
+       ${PROGDIR}/PBIfiles/copylibs.sh ${i} ${PBILOC}/lib/ ${PROGDIR}
      fi
   done
 

Modified: pbibuild/pbibuilder8/scripts/2.1.startmake.sh
===================================================================
--- pbibuild/pbibuilder8/scripts/2.1.startmake.sh	2009-12-02 20:53:12 UTC (rev 5214)
+++ pbibuild/pbibuilder8/scripts/2.1.startmake.sh	2009-12-02 20:55:43 UTC (rev 5215)
@@ -59,7 +59,6 @@
 
 # Set our buildworld variables
 case ${FBSD8BASE} in
-   8.1) BUILDWORLD="${PROGDIR}/buildworld81" ; export BUILDWORLD ;;
    *) BUILDWORLD="${PROGDIR}/buildworld" ; export BUILDWORLD ;;
 esac
 
@@ -128,7 +127,7 @@
   CPROGNAME="`echo $PROGNAME | tr -d ' '`"
   if [ -z "${PBILOCALBASE}" ]
   then
-    PBILOCALBASE="/Programs/${CPROGNAME}${PORTVER}"
+    PBILOCALBASE="/Programs/${CPROGNAME}"
   fi
 
   rm -rf ${PDESTDIR}/usr/local

Modified: pbibuild/pbibuilder8/scripts/3.makepbi.sh
===================================================================
--- pbibuild/pbibuilder8/scripts/3.makepbi.sh	2009-12-02 20:53:12 UTC (rev 5214)
+++ pbibuild/pbibuilder8/scripts/3.makepbi.sh	2009-12-02 20:55:43 UTC (rev 5215)
@@ -81,7 +81,7 @@
 CPROGNAME="`echo $PROGNAME | tr -d ' '`"
 if [ -z "${PBILOCALBASE}" ]
 then
-  PBILOCALBASE="/Programs/${CPROGNAME}${PORTVER}"
+  PBILOCALBASE="/Programs/${CPROGNAME}"
   export PBILOCALBASE
 fi
 



More information about the Commits mailing list