[PC-BSD Commits] r1042 - pbibuild/pbibuilder/scripts

svn at pcbsd.org svn at pcbsd.org
Wed Dec 19 12:36:11 PST 2007


Author: kris
Date: 2007-12-19 12:36:11 -0800 (Wed, 19 Dec 2007)
New Revision: 1042

Modified:
   pbibuild/pbibuilder/scripts/3.makepbi.sh
Log:

Added a new feature to pbi.conf to specify a different variable name in Makefile which indicates a ports "version" number



Modified: pbibuild/pbibuilder/scripts/3.makepbi.sh
===================================================================
--- pbibuild/pbibuilder/scripts/3.makepbi.sh	2007-12-19 20:29:20 UTC (rev 1041)
+++ pbibuild/pbibuilder/scripts/3.makepbi.sh	2007-12-19 20:36:11 UTC (rev 1042)
@@ -43,12 +43,23 @@
 MODULEDIR="${PROGDIR}/modules/${module}" ; export MODULEDIR
 BLOG="${OUTDIR}/build.log" ; export BLOG
 
-# Get the port version number
-PORTVER="`grep DISTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`" 
 
+# Check if we have a custom version string key and try to set PORTVER
+if [ ! -z "${VERKEY}" ]
+then
+ # Now try the supplied VERKEY strings
+ PORTVER="`grep $VERKEY ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`"
+fi
+
 if [ -z "${PORTVER}" ]
 then
+ # Get the port version number
+ PORTVER="`grep DISTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`" 
+fi
 
+if [ -z "${PORTVER}" ]
+then
+
  # Now try the PORTVERSION= line
  PORTVER="`grep PORTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`" 
  if [ -z "$PORTVER" -o "${PORTVER}" = " " ]
@@ -64,6 +75,7 @@
  PORTVER="`grep DISTVERSION?= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`"
 fi
 
+
 # Check if we have a portrevision to use in version number
 cat ${PDESTDIR}/${PBIPORT}/Makefile | grep "PORTREVISION="
 if [ "$?" = "0" ]
@@ -75,6 +87,7 @@
 fi
 
 echo "PORTREV ${PORTREV}
+PORTVER ${PORTVER}
 PVNUM: $PVNUM"
 
 export PORTVER



More information about the Commits mailing list