Bumping Qt version 1.1.93
[gc-dialer] / support / builddeb.py
index 203beaf..157cb9c 100755 (executable)
@@ -12,31 +12,49 @@ import constants
 
 
 __appname__ = constants.__app_name__
-__description__ = """
+__description__ = """Touch screen enhanced interface to the GoogleVoice phone service"
+Features:
 .
-Homepage:
+* Dialpad for quick call
+.
+* Checking voicemails, texts, call history
+.
+* Sending texts
+.
+* Notification support for texts, voicemail, and/or missed calls
+.
+Homepage: http://gc-dialer.garage.maemo.org/
 """
 __author__ = "Ed Page"
 __email__ = "eopage@byu.net"
 __version__ = constants.__version__
 __build__ = constants.__build__
 __changelog__ = """
-"""
+* Fixing a window title
+* Fixing a bug where non-normalized numbers were used, leading to problems
+""".strip()
 
 
 __postinstall__ = """#!/bin/sh -e
 
 gtk-update-icon-cache -f /usr/share/icons/hicolor
+rm -f ~/.%(name)s/%(name)s.log
+rm -f ~/.%(name)s/notifier.log
+""" % {"name": constants.__app_name__}
+
+__preremove__ = """#!/bin/sh -e
+
+python /opt/dialcentral/lib/alarm_handler.py -d || true
 """
 
 
-def find_files(path):
+def find_files(prefix, path):
        for root, dirs, files in os.walk(path):
                for file in files:
-                       if file.startswith("src-"):
+                       if file.startswith(prefix+"-"):
                                fileParts = file.split("-")
                                unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
-                               assert unused == "src"
+                               assert unused == prefix
                                relPath = os.sep.join(relPathParts)
                                yield relPath, file, newName
 
@@ -60,8 +78,7 @@ def build_package(distribution):
        p = py2deb.Py2deb(__appname__)
        p.prettyName = constants.__pretty_app_name__
        p.description = __description__
-       p.bugTracker = ""
-       p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
+       p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=Dialcentral"
        p.author = __author__
        p.mail = __email__
        p.license = "lgpl"
@@ -80,9 +97,9 @@ def build_package(distribution):
        p.recommends = ", ".join([
        ])
        p.section = {
-               "debian": "",
-               "diablo": "",
-               "fremantle": "",
+               "debian": "comm",
+               "diablo": "user/network",
+               "fremantle": "user/network",
        }[distribution]
        p.arch = "all"
        p.urgency = "low"
@@ -90,24 +107,25 @@ def build_package(distribution):
        p.repository = "extras"
        p.changelog = __changelog__
        p.postinstall = __postinstall__
+       p.preremove = __preremove__
        p.icon = {
-               "debian": "",
-               "diablo": "",
-               "fremantle": "", # Fremantle natively uses 48x48
+               "debian": "26x26-dialcentral.png",
+               "diablo": "26x26-dialcentral.png",
+               "fremantle": "64x64-dialcentral.png", # Fremantle natively uses 48x48
        }[distribution]
-       p["/usr/bin"] = [ "" ]
-       for relPath, files in unflatten_files(find_files(".")).iteritems():
-               fullPath = ""
+       p["/opt/%s/bin" % __appname__] = [ "%s.py" % __appname__ ]
+       for relPath, files in unflatten_files(find_files("src", ".")).iteritems():
+               fullPath = "/opt/%s/lib" % __appname__
                if relPath:
                        fullPath += os.sep+relPath
                p[fullPath] = list(
                        "|".join((oldName, newName))
                        for (oldName, newName) in files
                )
-       p["/usr/share/applications/hildon"] = [""]
-       p["/usr/share/icons/hicolor/26x26/hildon"] = [""]
-       p["/usr/share/icons/hicolor/64x64/hildon"] = [""]
-       p["/usr/share/icons/hicolor/scalable/hildon"] = [""]
+       p["/usr/share/applications/hildon"] = ["dialcentral.desktop"]
+       p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-dialcentral.png|dialcentral.png"]
+       p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-dialcentral.png|dialcentral.png"]
+       p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-dialcentral.png|dialcentral.png"]
 
        if distribution == "debian":
                print p