X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=support%2Fbuilddeb.py;h=30ce1085d7c74f4b835cbebc53af1bfdfe5e674e;hb=79183c7fe306093ae3a235b8ef21746aeb497ff5;hp=ec08df7fced1170e56d6b0e9ccfe2b1b585c4c24;hpb=ae8c4f64f9ac413ef6cc0143925b4ced80bbb532;p=ejpi diff --git a/support/builddeb.py b/support/builddeb.py index ec08df7..30ce108 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -1,15 +1,48 @@ #!/usr/bin/python2.5 -from py2deb import * +import os +import sys +try: + import py2deb +except ImportError: + import fake_py2deb as py2deb -__appname__ = "ejpi" -__description__ = "A Touch Screen Optimized RPN Calculator using Pie Menus" +import constants + + +__appname__ = constants.__app_name__ +__description__ = """A Touch Screen Optimized RPN Calculator using Pie Menus +RPN: Stack based math, come on it is fun +Pie Menus: Press them or press-drag them +History: Its such a drag, so drag them around, delete them, etc +. +Homepage: http://ejpi.garage.maemo.org/ +""" __author__ = "Ed Page" __email__ = "eopage@byu.net" -__version__ = "0.9.3" -__build__ = 1 -__changelog__ = ''' +__version__ = constants.__version__ +__build__ = constants.__build__ +__changelog__ = """ +0.9.7 +* Added shortcut to copy result +* Shortcuts: Backspace - as expected, Ctrl+Backspace - unpops, Enter - pops +* BugFix: Attempt two at bigger X button +* Bugfix: Inconsistent location of pie items on the computer section +* Added support for creating .deb generic linux package files + +0.9.6 +* Fullscreen by Ctrl+Enter +* "Enter" in number entry causes a push +* Reversed stack order to be more proper +* Logging support, Ctrl+l to copy the log +* Fremantle Support + +0.9.4 + * Added icons + * Minor improvements + * Swapping the keyboard positions, seem more friendly to my thumb location this way + 0.9.3 - "" * Added +/-, !, sq, and sqrt functions * Improved Documentation @@ -31,13 +64,14 @@ __changelog__ = ''' * Modifiable history * Supports different number types and bases * Basic trig support -''' +""" -__postinstall__ = '''#!/bin/sh +__postinstall__ = """#!/bin/sh -e -gtk-update-icon-cache /usr/share/icons/hicolor -''' +gtk-update-icon-cache -f /usr/share/icons/hicolor +rm -f ~/.ejpi/ejpi.log +""" def find_files(path): @@ -60,26 +94,55 @@ def unflatten_files(files): return d -if __name__ == "__main__": +def build_package(distribution): try: os.chdir(os.path.dirname(sys.argv[0])) except: pass - p = Py2deb(__appname__) + py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution] + p = py2deb.Py2deb(__appname__) + p.prettyName = constants.__pretty_app_name__ p.description = __description__ + p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=ejpi" + #p.upgradeDescription = __changelog__.split("\n\n", 1)[0] p.author = __author__ p.mail = __email__ p.license = "lgpl" - p.depends = "python2.5, python2.5-gtk2" - p.section = "user/accessories" + p.depends = ", ".join([ + "python2.6 | python2.5", + "python-gtk2 | python2.5-gtk2", + "python-xml | python2.5-xml", + "python-dbus | python2.5-dbus", + ]) + maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon" + p.depends += { + "debian": ", python-glade2", + "chinook": maemoSpecificDepends, + "diablo": maemoSpecificDepends, + "fremantle": maemoSpecificDepends + ", python-glade2", + "mer": maemoSpecificDepends + ", python-glade2", + }[distribution] + p.section = { + "debian": "math", + "chinook": "accessories", + "diablo": "user/science", + "fremantle": "user/science", + "mer": "user/science", + }[distribution] p.arch = "all" p.urgency = "low" - p.distribution = "chinook diablo" - p.repository = "extras-devel" + p.distribution = "chinook diablo fremantle mer debian" + p.repository = "extras" p.changelog = __changelog__ p.postinstall = __postinstall__ - p.icon="26x26-ejpi.png" + p.icon = { + "debian": "26x26-ejpi.png", + "chinook": "26x26-ejpi.png", + "diablo": "26x26-ejpi.png", + "fremantle": "64x64-ejpi.png", # Fremantle natively uses 48x48 + "mer": "64x64-ejpi.png", + }[distribution] p["/usr/bin"] = [ "ejpi.py" ] for relPath, files in unflatten_files(find_files(".")).iteritems(): fullPath = "/usr/lib/ejpi" @@ -90,12 +153,45 @@ if __name__ == "__main__": for (oldName, newName) in files ) p["/usr/share/applications/hildon"] = ["ejpi.desktop"] - # p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-ejpi.png|ejpi.png"] - # p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-ejpi.png|ejpi.png"] - # p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-ejpi.png|ejpi.png"] - - print p - print p.generate( - __version__, __build__, changelog=__changelog__, - tar=True, dsc=True, changes=True, build=False, src=True - ) + p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-ejpi.png|ejpi.png"] + p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-ejpi.png|ejpi.png"] + p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-ejpi.png|ejpi.png"] + + 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__": + if len(sys.argv) > 1: + try: + import optparse + except ImportError: + optparse = None + + if optparse is not None: + parser = optparse.OptionParser() + (commandOptions, commandArgs) = parser.parse_args() + else: + commandArgs = None + commandArgs = ["diablo"] + build_package(commandArgs[0])