9 import fake_py2deb as py2deb
14 __appname__ = constants.__app_name__
15 __description__ = """Simple list management application
17 Homepage: http://multilist.garage.maemo.org/
19 __author__ = "Christoph Wurstle"
20 __email__ = "n800@axique.net"
21 __version__ = constants.__version__
22 __build__ = constants.__build__
25 * Bugfix: Fixing the application launcher
28 * Making rotation configurable in the Settings window
29 * Persisting full-screen / rotation settings
33 * Turned the settings dialog into a window
36 * Massive code cleanup
37 * Re-arrangement of GTK Menus
39 * Moved Active/All filter to menu
40 * Moved Checkout All to menu
42 * Removed unnesary UI elements
43 * Switched to real inconsistent check boxes for tasks
44 * Switching the settings dialog to be more Maemo 5 like
47 * I18N, extract de.po, add ru.po.
54 __postinstall__ = """#!/bin/sh -e
56 gtk-update-icon-cache -f /usr/share/icons/hicolor
57 rm -f ~/.multilist/multilist.log
61 def find_files(path, root):
63 for unusedRoot, dirs, files in os.walk(path):
65 if file.startswith(root+"-"):
66 print "\t", root, file
67 fileParts = file.split("-")
68 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
70 relPath = os.sep.join(relPathParts)
71 yield relPath, file, newName
74 def unflatten_files(files):
76 for relPath, oldName, newName in files:
79 d[relPath].append((oldName, newName))
83 def build_package(distribution):
85 os.chdir(os.path.dirname(sys.argv[0]))
89 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
90 p = py2deb.Py2deb(__appname__)
91 p.prettyName = constants.__pretty_app_name__
92 p.description = __description__
93 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=quicknote"
94 p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
98 p.depends = ", ".join([
99 "python2.6 | python2.5",
100 "python-gtk2 | python2.5-gtk2",
101 "python-xml | python2.5-xml",
102 "python-dbus | python2.5-dbus",
104 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
106 "debian": ", python-glade2",
107 "diablo": maemoSpecificDepends,
108 "fremantle": maemoSpecificDepends + ", python-glade2",
112 "diablo": "user/office",
113 "fremantle": "user/office",
117 p.distribution = "diablo fremantle debian"
118 p.repository = "extras"
119 p.changelog = __changelog__
120 p.postinstall = __postinstall__
122 "debian": "26x26-multilist.png",
123 "diablo": "26x26-multilist.png",
124 "fremantle": "40x40-multilist.png", # Fremantle natively uses 48x48
126 p["/usr/bin"] = [ "multilist.py" ]
127 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
128 fullPath = "/usr/share/locale"
130 fullPath += os.sep+relPath
132 "|".join((oldName, newName))
133 for (oldName, newName) in files
135 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
136 fullPath = "/usr/lib/multilist"
138 fullPath += os.sep+relPath
140 "|".join((oldName, newName))
141 for (oldName, newName) in files
143 p["/usr/share/applications/hildon"] = ["multilist.desktop"]
144 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-multilist.png|multilist.png"]
145 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-multilist.png|multilist.png"]
146 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-multilist.png|multilist.png"]
148 if distribution == "debian":
151 version="%s-%s" % (__version__, __build__),
152 changelog=__changelog__,
158 print "Building for %s finished" % distribution
162 version="%s-%s" % (__version__, __build__),
163 changelog=__changelog__,
169 print "Building for %s finished" % distribution
172 if __name__ == "__main__":
173 if len(sys.argv) > 1:
179 if optparse is not None:
180 parser = optparse.OptionParser()
181 (commandOptions, commandArgs) = parser.parse_args()
184 commandArgs = ["diablo"]
185 build_package(commandArgs[0])