[Treepkg-commits] r512 - trunk/recipes/wince/gnupg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 8 12:48:26 CET 2011


Author: aheinecke
Date: 2011-03-08 12:48:26 +0100 (Tue, 08 Mar 2011)
New Revision: 512

Modified:
   trunk/recipes/wince/gnupg/base.py
   trunk/recipes/wince/gnupg/libksba_ce.py
Log:
Change the packaging rules to handle git sources


Modified: trunk/recipes/wince/gnupg/base.py
===================================================================
--- trunk/recipes/wince/gnupg/base.py	2011-02-08 18:07:57 UTC (rev 511)
+++ trunk/recipes/wince/gnupg/base.py	2011-03-08 11:48:26 UTC (rev 512)
@@ -45,7 +45,20 @@
                            % filename)
 
     def determine_package_version(self, directory):
-        return "%s-svn%s" % (self.orig_source_version(directory), self.revision)
+        """ Returns a Git package Name """
+        date = run.capture_output(cmdexpand("/bin/sh -c \" git log --date=iso \
+                                             -n 1 | grep Date \
+                                             | awk \'{print $$2}\'\""),
+                                             cwd=directory)
+        time = run.capture_output(cmdexpand("/bin/sh -c \" git log --date=iso \
+                                             -n 1 | grep Date \
+                                             | awk \'{print $$3}\'\""),
+                                             cwd=directory)
+        date = date.replace('-','')
+        time = time.replace(':','')
+        return "%s~%s%s.git%s" % (self.orig_source_version(directory),
+                              date[:8], time[:4], self.revision[:7])
+
     def sign_package(self):
         return None
 
@@ -61,8 +74,8 @@
         # ran on a copy that did not include the .svn subdirectories and
         # thus could not find the svn revision.
         treepkg.util.replace_in_file(os.path.join(pkgbasedir, "configure"),
-                                     re.escape(orig_version) + "-svn0",
-                                     orig_version + "-svn%s" % self.revision)
+                                     re.escape(orig_version) + "-git0",
+                                     orig_version + "-git%s" % self.revision)
 
         pkgbasename = self.pkg_basename + "_" + pkgbaseversion
         origtargz = os.path.join(self.work_dir,
@@ -70,7 +83,7 @@
         self.create_tarball(origtargz, self.work_dir,
                             os.path.basename(pkgbasedir))
 
-        changemsg = ("Update to SVN rev. %s" % (self.revision,))
+        changemsg = ("Update to GIT rev. %s" % (self.revision,))
         self.copy_debian_directory(pkgbasedir, pkgbaseversion,
                                    changemsg)
 
@@ -113,6 +126,7 @@
 export PATH=:$PATH:$MINGWPATH/bin:$MINGWPATH/arm-mingw32ce/bin:\
 $MINGWPATH/libexec/gcc/arm-mingw32ce/4.4.0:
 export w32ce_root=/opt/mingw32ce
+export w32root=/opt/mingw32ce
 
 ./autogen.sh --build-w32ce
 
@@ -156,8 +170,8 @@
         orig_version = self.orig_source_version(copied_working_copy)
         treepkg.util.replace_in_file(os.path.join(copied_working_copy, 
                                                   "configure"), 
-                                     re.escape(orig_version) + "-svn0",
-                                     orig_version + "-svn%s" % self.revision)
+                                     re.escape(orig_version) + "-git0",
+                                     orig_version + "-git%s" % self.revision)
       
         script = (self.createtarball_script
                   % dict(builddeps=" ".join(self.track.dependencies_required()
@@ -196,7 +210,7 @@
         self.create_original_tarball()
         orig_dir = self.create_orig_dir()
 
-        changemsg = ("Update to SVN rev. %s" % (self.revision,))
+        changemsg = ("Update to GIT rev. %s" % (self.revision,))
         self.copy_debian_directory(orig_dir, self.pkgbaseversion, changemsg)
 
         self.create_source_package(orig_dir, self.origtargz)

Modified: trunk/recipes/wince/gnupg/libksba_ce.py
===================================================================
--- trunk/recipes/wince/gnupg/libksba_ce.py	2011-02-08 18:07:57 UTC (rev 511)
+++ trunk/recipes/wince/gnupg/libksba_ce.py	2011-03-08 11:48:26 UTC (rev 512)
@@ -11,9 +11,9 @@
 import base
 base.define_gnupg_packager("libksba-ce-arm", 
                             make_dist_command="./configure --enable-maintainer-mode \
-                                                \nmake\nmake dist",
+                                                \nmake dist",
                             tarball_dependencies=("autoconf","automake",
                                                   "texinfo", "subversion",
                                                   "transfig", "gs",
-                                                  "libgpg-error-dev"))
+                                                  "libgpg-error-ce-arm-dev"))
 



More information about the Treepkg-commits mailing list