r460 - in zope-debhelper/trunk: . debian

Fabio Tranchitella kobold at alioth.debian.org
Fri Nov 10 07:51:45 CET 2006


Author: kobold
Date: 2006-11-10 07:51:44 +0100 (Fri, 10 Nov 2006)
New Revision: 460

Modified:
   zope-debhelper/trunk/debian/changelog
   zope-debhelper/trunk/dh_installzope
Log:
Changes.


Modified: zope-debhelper/trunk/debian/changelog
===================================================================
--- zope-debhelper/trunk/debian/changelog	2006-11-09 20:19:15 UTC (rev 459)
+++ zope-debhelper/trunk/debian/changelog	2006-11-10 06:51:44 UTC (rev 460)
@@ -4,6 +4,7 @@
     + Support for zope2.10 by default.
     + Support for ">= 2.x" ZopeVersions.
     + Find out the package name if it is not specified by the .dzproduct file.
+    + Support for global zope3 products.
   * Fix bashism in config-dzinstance.
   * Set urgency to medium, this upload is targetted etch.
 

Modified: zope-debhelper/trunk/dh_installzope
===================================================================
--- zope-debhelper/trunk/dh_installzope	2006-11-09 20:19:15 UTC (rev 459)
+++ zope-debhelper/trunk/dh_installzope	2006-11-10 06:51:44 UTC (rev 460)
@@ -96,6 +96,7 @@
 init();
 
 my @zope_versions = ('2.6', '2.7', '2.8', '2.9', '2.10', '3');
+my %python_versions = ('3', '2.4');
 
 sub read_dzfile {
     my $fn = shift;
@@ -262,8 +263,24 @@
             doit("install","-d","$tmp/usr/$archdir/zope/Products/$target");
  
             my $pwd=`pwd`; chop($pwd);
-            complex_doit("cd $dir && find -type f$exclude$exclude_debian -exec install -D --mode=644 {} " .
-                         "$pwd/$tmp/usr/$archdir/zope/Products/$target/{} \\;");
+            if (exists $dzproduct{'Global'} && $dzproduct{'Global'} eq 'yes') {
+                if ($dzproduct{'ZopeVersions'} != '3') {
+                    error("global products are supported only for zope3");
+                }
+                my ($pyver) = $python_versions{$dzproduct{'ZopeVersions'}};
+                addsubstvar($package, "zope:PythonVersion", $pyver);
+                complex_doit("cd $dir && find -type f$exclude$exclude_debian " .
+                    "-exec install -D --mode=644 {} $pwd/$tmp/usr/lib/python$pyver/" .
+                    "site-packages/$target/{} \\;");
+                complex_doit("mkdir -p $pwd/$tmp/usr/$archdir/zope/Products/$target");
+                complex_doit("find $pwd/$tmp/usr/lib/python$pyver/site-packages/$target".
+                " \\( -name \\*-configure.zcml -o -name \\*-ftesting.meta -o -name " .
+                "\\*-meta.zcml \\) -exec mv {} $pwd/$tmp/usr/$archdir/zope/Products" .
+                "/$target/ \\;");
+            } else {
+                complex_doit("cd $dir && find -type f$exclude$exclude_debian -exec install -D ".
+                    "--mode=644 {} $pwd/$tmp/usr/$archdir/zope/Products/$target/{} \\;");
+            }
  
             write_dzfile("$tmp/usr/$archdir/zope/Products/$target/.dzproduct", %dzproduct);
             if (! $dh{NOSCRIPTS}) {




More information about the pkg-zope-commits mailing list