[PC-BSD Commits] r1086 - pcbsd/trunk/PBCsource

svn at pcbsd.org svn at pcbsd.org
Wed Jan 2 09:21:40 PST 2008


Author: kris
Date: 2008-01-02 09:21:40 -0800 (Wed, 02 Jan 2008)
New Revision: 1086

Modified:
   pcbsd/trunk/PBCsource/createpbi.sh
Log:

Added code to createpbi.sh script which calculates the PBI size and MD5
during creation. This will be used during the install process in the PBIsource
tool



Modified: pcbsd/trunk/PBCsource/createpbi.sh
===================================================================
--- pcbsd/trunk/PBCsource/createpbi.sh	2008-01-02 17:19:38 UTC (rev 1085)
+++ pcbsd/trunk/PBCsource/createpbi.sh	2008-01-02 17:21:40 UTC (rev 1086)
@@ -72,6 +72,17 @@
 sed -e "s,PBIUpdate:,ProgUpdateURL:,g" ${WORKDIR}/PkgConfig > ${WORKDIR}/.pkgtmp
 mv ${WORKDIR}/.pkgtmp ${WORKDIR}/PkgConfig 
 
+# Calculate the size of the software we are packaging
+du -c -m $PBILOC >$WORKDIR/.duout
+
+tail -n 1 ${WORKDIR}/.duout | grep total 2>/dev/null
+if [ "$?" = "0" ]
+then
+ PBISIZE="`tail -n 1 ${WORKDIR}/.duout | cut -f 1`"
+ echo "ProgSize: $PBISIZE" >> ${WORKDIR}/PkgConfig
+fi
+
+
 # Check if we need to include the license file
 cat ${PBCFILE} | grep '^License: YES' >/dev/null
 if [ "$?" = "0" ]
@@ -128,6 +139,17 @@
      done
   fi
 
+  # Now copy all the files from /lib into the autolibs directory since this
+  # improves compat across FBSD versions
+
+  tar cvf - -C /lib . 2>/dev/null | tar xvf - -C ${PBILOC}/autolibs 2>/dev/null
+  # Do the same for libexec
+  tar cvf - -C /libexec . 2>/dev/null | tar xvf - -C ${PBILOC}/autolibs 2>/dev/null
+
+  # Set the perms to make them removable for libs
+  chflags -R noschg ${PBILOC}
+
+
   # All done getting the program libs!
   echo "Done!"
 fi
@@ -149,6 +171,10 @@
   exit 2
 fi
 
+# Calculate the md5 for the Package.tar.lzma file
+CHECKSUM="`md5 ${WORKDIR}/Package.tar.lzma | cut -d '=' -f 2`"
+echo "ProgCheck:$CHECKSUM" >> ${WORKDIR}/PkgConfig
+
 # Get the number of lines in the .lines log file
 echo "`wc -l ${WORKDIR}/.lines | cut -d "/" -f 1`" >>${WORKDIR}/.tmpline
 



More information about the Commits mailing list