changeset 549:e38976f77e26

Change the packaging rules to handle git sources
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 08 Mar 2011 11:48:26 +0000 (2011-03-08)
parents 6b6cd977785c
children f841b369aa80
files recipes/wince/gnupg/base.py recipes/wince/gnupg/libksba_ce.py
diffstat 2 files changed, 23 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/recipes/wince/gnupg/base.py	Tue Feb 08 18:07:57 2011 +0000
+++ b/recipes/wince/gnupg/base.py	Tue Mar 08 11:48:26 2011 +0000
@@ -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)
--- a/recipes/wince/gnupg/libksba_ce.py	Tue Feb 08 18:07:57 2011 +0000
+++ b/recipes/wince/gnupg/libksba_ce.py	Tue Mar 08 11:48:26 2011 +0000
@@ -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"))
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)