X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=blobdiff_plain;f=support%2Fbuilddeb.py;h=162ec16d09629229c429b7bc718e481d4bca82d8;hp=203beafa64ce569134bd0b02ce07a5eb45028ac0;hb=8108e3b076e3609bb0e26aa51ebb5bf54be7fee3;hpb=16b36198292fdb9618d2b568e5cce2e5b3c55198 diff --git a/support/builddeb.py b/support/builddeb.py index 203beaf..162ec16 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -3,40 +3,45 @@ import os import sys -try: - import py2deb -except ImportError: - import fake_py2deb as py2deb +import py2deb import constants __appname__ = constants.__app_name__ -__description__ = """ +__description__ = """Unit Conversions +A conversion utility that allows conversion between many units like CGS, Ancient, Imperial with many categories like length, mass, numbers, etc. All units converted values shown at once as you type . -Homepage: +Homepage: http://www.unihedron.com/projects/gonvert/index.php """ -__author__ = "Ed Page" -__email__ = "eopage@byu.net" +__author__ = "Anthony Tekatch" +__email__ = "anthony@unihedron.com" __version__ = constants.__version__ __build__ = constants.__build__ __changelog__ = """ +* A condensed view of unit conversion for those who so chose +* Changed the way windows handle closing +* Improved performance of jumping between some of the windows (including startup) """ __postinstall__ = """#!/bin/sh -e gtk-update-icon-cache -f /usr/share/icons/hicolor +rm -f ~/.gonvert/gonvert.log ~/.gonvert/selections.dat ~/.gonvert/window.dat +""" + +__preremove__ = """#!/bin/sh -e """ -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,29 +65,25 @@ 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=Gonvert" p.author = __author__ p.mail = __email__ - p.license = "lgpl" + p.license = "gpl" p.depends = ", ".join([ "python2.6 | python2.5", - "python-gtk2 | python2.5-gtk2", - "python-xml | python2.5-xml", - "python-dbus | python2.5-dbus", + "python-simplejson", ]) - maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon" p.depends += { - "debian": ", python-glade2", - "diablo": maemoSpecificDepends + ", python2.5-conic", - "fremantle": maemoSpecificDepends + ", python-glade2, python-alarm", + "debian": ", python-qt4", + "diablo": ", python2.5-qt4-core, python2.5-qt4-gui", + "fremantle": ", python2.5-qt4-core, python2.5-qt4-gui, python2.5-qt4-maemo5", }[distribution] p.recommends = ", ".join([ ]) p.section = { - "debian": "", - "diablo": "", - "fremantle": "", + "debian": "science", + "diablo": "user/science", + "fremantle": "user/science", }[distribution] p.arch = "all" p.urgency = "low" @@ -90,24 +91,33 @@ 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": "data-pixmaps-gonvert.png", + "diablo": "data-pixmaps-gonvert.png", + "fremantle": "data-pixmaps-gonvert.png", # Fremantle natively uses 48x48 }[distribution] - p["/usr/bin"] = [ "" ] - for relPath, files in unflatten_files(find_files(".")).iteritems(): - fullPath = "" + p["/opt/gonvert/bin"] = [ "gonvert.py" ] + for relPath, files in unflatten_files(find_files("src", ".")).iteritems(): + fullPath = "/opt/gonvert/lib" + if relPath: + fullPath += os.sep+relPath + p[fullPath] = list( + "|".join((oldName, newName)) + for (oldName, newName) in files + ) + for relPath, files in unflatten_files(find_files("data", ".")).iteritems(): + fullPath = "/opt/gonvert/share" 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"] = ["gonvert.desktop"] + p["/usr/share/icons/hicolor/26x26/hildon"] = ["data-pixmaps-gonvert.png|gonvert.png"] + p["/usr/share/icons/hicolor/64x64/hildon"] = ["data-pixmaps-gonvert.png|gonvert.png"] + p["/usr/share/icons/hicolor/scalable/hildon"] = ["data-pixmaps-gonvert.png|gonvert.png"] if distribution == "debian": print p