FIxing a mistake in packaging stuff
[theonering] / support / builddeb.py
index cabcaab..f84d072 100755 (executable)
@@ -1,9 +1,5 @@
 #!/usr/bin/python2.5
 
-"""
-@bug In update desrcription stuff
-"""
-
 import os
 import sys
 
@@ -16,7 +12,10 @@ import constants
 
 
 __appname__ = constants.__app_name__
-__description__ = "Google Voice Communication Plugin"
+__description__ = """Google Voice Communication Plugin
+.
+Homepage: http://theonering.garage.maemo.org
+"""
 __author__ = "Ed Page"
 __email__ = "eopage@byu.net"
 __version__ = constants.__version__
@@ -30,6 +29,7 @@ __changelog__ = """
 __postinstall__ = """#!/bin/sh -e
 
 gtk-update-icon-cache -f /usr/share/icons/hicolor
+rm -f ~/.telepathy-theonering/telepathy-theonering.log
 """
 
 def find_files(path):
@@ -60,8 +60,10 @@ def build_package(distribution):
 
        py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
        p = py2deb.Py2deb(__appname__)
+       p.prettyName = constants.__pretty_app_name__
        p.description = __description__
-       p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
+       p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=theonering"
+       #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
        p.author = __author__
        p.mail = __email__
        p.license = "lgpl"
@@ -99,22 +101,36 @@ def build_package(distribution):
                        "|".join((oldName, newName))
                        for (oldName, newName) in files
                )
-       p["/usr/share/dbus-1/services"] = ["org.freedesktop.Telepathy.ConnectionManager.theonering.service.in"]
+       p["/usr/share/dbus-1/services"] = ["org.freedesktop.Telepathy.ConnectionManager.theonering.service"]
+       if distribution == "debian":
+               p["/usr/share/mission-control/profiles"] = ["theonering.profile"]
        p["/usr/share/telepathy/managers"] = ["theonering.manager"]
        p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-theonering.png|theonering.png"]
        p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-theonering.png|theonering.png"]
        p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-theonering.png|theonering.png"]
 
-       print p
-       print p.generate(
-               version="%s-%s" % (__version__, __build__),
-               changelog=__changelog__,
-               build=False,
-               tar=True,
-               changes=True,
-               dsc=True,
-       )
-       print "Building for %s finished" % distribution
+       if distribution == "debian":
+               print p
+               print p.generate(
+                       version="%s-%s" % (__version__, __build__),
+                       changelog=__changelog__,
+                       build=True,
+                       tar=False,
+                       changes=False,
+                       dsc=False,
+               )
+               print "Building for %s finished" % distribution
+       else:
+               print p
+               print p.generate(
+                       version="%s-%s" % (__version__, __build__),
+                       changelog=__changelog__,
+                       build=False,
+                       tar=True,
+                       changes=True,
+                       dsc=True,
+               )
+               print "Building for %s finished" % distribution
 
 
 if __name__ == "__main__":