[gnue] r9837 - in trunk/gnue-common/packaging/osx: . build-env/Resources

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: johannes
Date: 2007-12-05 03:52:03 -0600 (Wed, 05 Dec 2007)
New Revision: 9837

Modified:
   trunk/gnue-common/packaging/osx/build-env/Resources/postflight
   trunk/gnue-common/packaging/osx/create-build.dist_template
Log:
Changed build process to be compatible with OS X Leopard


Modified: trunk/gnue-common/packaging/osx/build-env/Resources/postflight
===================================================================
--- trunk/gnue-common/packaging/osx/build-env/Resources/postflight	2007-11-27 09:44:25 UTC (rev 9836)
+++ trunk/gnue-common/packaging/osx/build-env/Resources/postflight	2007-12-05 09:52:03 UTC (rev 9837)
@@ -4,8 +4,9 @@
 # Compile and optimize all python files of gnue
 #
 
-PYTHON=python2.3
-SITE=`$PYTHON -c "import site; print site.here"`
+PYTHON=python
+# python2.4+ has no site.here anymore
+SITE=`$PYTHON -c "import site, os.path; print os.path.dirname(site.__file__)"`
 COMPILE="$SITE/compileall.py"
 SITELIB="$SITE/site-packages/gnue"
 

Modified: trunk/gnue-common/packaging/osx/create-build.dist_template
===================================================================
--- trunk/gnue-common/packaging/osx/create-build.dist_template	2007-11-27 09:44:25 UTC (rev 9836)
+++ trunk/gnue-common/packaging/osx/create-build.dist_template	2007-12-05 09:52:03 UTC (rev 9837)
@@ -24,14 +24,33 @@
   exit 1
 fi
 
+
 # ---------------------------------------------------------------------------
+# Find the packagemaker we can use.  This is different in OS X 10.4 and 10.5
+# ---------------------------------------------------------------------------
+
+pkgmaker=/Developer/Tools/packagemaker
+if [ ! -x $pkgmaker ];
+then
+  pkgmaker=/Developer/usr/bin/packagemaker
+fi
+
+if [ ! -x $pkgmaker ];
+then
+  echo "No packagemaker binary found"
+  exit 1
+fi
+
+# ---------------------------------------------------------------------------
 # Get the package-name and version from the PKG-INFO file
 # ---------------------------------------------------------------------------
 
-volname=":PACKAGE:-:VERSION:-py23"
-package=":PACKAGE:-py23.pkg"
+pyver=`python -c "import sys; print sys.version[:3].replace('.', '')"`
 
+volname=":PACKAGE:-:VERSION:-py$pyver"
+package=":PACKAGE:-py$pyver.pkg"
 
+
 # ---------------------------------------------------------------------------
 # Populate the package environment
 # ---------------------------------------------------------------------------
@@ -91,7 +110,7 @@
 # Build the package
 # ---------------------------------------------------------------------------
 echo "Building the package ..."
-/Developer/Tools/packagemaker -build -p $package -f $destdir -ds -r $resdir -i Info.plist -d Description.plist
+$pkgmaker -build -p $package -f $destdir -ds -r $resdir -i Info.plist -d Description.plist
 
 # ---------------------------------------------------------------------------
 # Get rid of the obsolte directories
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.