Adding support for building .debs
[theonering] / support / py2deb.py
index a3cbc32..d1eac8a 100644 (file)
@@ -168,7 +168,8 @@ def py2changes(params):
     fileHandle = open('/tmp/py2deb2.tmp', 'w')
     fileHandle.write('#!/bin/sh\n')
     fileHandle.write("cd " +os.getcwd()+ "\n")
-    fileHandle.write("gpg --local-user %(mail)s --clearsign %(TEMP)s/%(name)s_%(version)s.changes\n" % params)
+    # TODO Renable signing
+    # fileHandle.write("gpg --local-user %(mail)s --clearsign %(TEMP)s/%(name)s_%(version)s.changes\n" % params)
     fileHandle.write("mv %(TEMP)s/%(name)s_%(version)s.changes.asc %(TEMP)s/%(name)s_%(version)s.changes\n" % params)
     fileHandle.write('\nexit')
     fileHandle.close()
@@ -191,7 +192,7 @@ def py2changes(params):
     shutil.move(l[0],tar)
     ret.append(tar)
 
-    l=glob("%(TEMP)s/%(name)s*.changes" % params)
+    l=glob("%(TEMP)s/%(name)s*_*_*.changes" % params)
     if len(l)!=1:
         raise Py2debException("don't find source package changes")
     tar = os.path.basename(l[0])
@@ -254,7 +255,8 @@ def py2dsc(TEMP, name, version, depends, author, mail, arch):
     try:
         fileHandle.write('#!/bin/sh\n')
         fileHandle.write("cd " + os.getcwd() + "\n")
-        fileHandle.write("gpg --local-user %(mail)s --clearsign %(TEMP)s/%(name)s_%(version)s.dsc\n" % locals())
+        # TODO Renable signing
+        # fileHandle.write("gpg --local-user %(mail)s --clearsign %(TEMP)s/%(name)s_%(version)s.dsc\n" % locals())
         fileHandle.write("mv %(TEMP)s/%(name)s_%(version)s.dsc.asc %(filename)s\n" % locals())
         fileHandle.write('\nexit')
         fileHandle.close()
@@ -501,8 +503,10 @@ class Py2deb(object):
             mail = author+"@"+socket.gethostname()
 
         self.name = name
+        self.prettyName = ""
         self.description = description
         self.upgradeDescription = ""
+        self.bugTracker = ""
         self.license = license
         self.depends = depends
         self.recommends = ""
@@ -753,8 +757,16 @@ FILES :
                 "Description: %(description)s",
             ]
 
+            if self.prettyName:
+                prettyName = "XSBC-Maemo-Display-Name: %s" % self.prettyName.strip()
+                specificParagraphFields.append("\n  ".join(prettyName.split("\n")))
+
+            if self.bugTracker:
+                bugTracker = "XSBC-Bugtracker: %s" % self.bugTracker.strip()
+                specificParagraphFields.append("\n  ".join(bugTracker.split("\n")))
+
             if self.upgradeDescription:
-                upgradeDescription = "XB-Maemo-Upgrade-Description: %s" % self.upgradeDescription.strip()
+                upgradeDescription = "XSBC-Maemo-Upgrade-Description: %s" % self.upgradeDescription.strip()
                 specificParagraphFields.append("\n  ".join(upgradeDescription.split("\n")))
 
             if self.icon:
@@ -769,7 +781,7 @@ FILES :
                     if i % 60 == 0:
                         uueIconLines.append("")
                     uueIconLines[-1] += c
-                uueIconLines[0:0] = ("XB-Maemo-Icon-26:", )
+                uueIconLines[0:0] = ("XSBC-Maemo-Icon-26:", )
                 specificParagraphFields.append("\n  ".join(uueIconLines))
 
             generalParagraph = "\n".join(generalParagraphFields)