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 * Added panning [removed due not being able to edit]
28 * Fixed a typo (loss of db with this)
29 * Switched to a spinner and switched unit to a combo
32 * Fixed check boxes on Maemo
35 * Corrected the bug tracker link
38 * Adding filtering for new and complete in addition to all and active
41 * Bugfix: Fixing the application launcher
44 * Making rotation configurable in the Settings window
45 * Persisting full-screen / rotation settings
49 * Turned the settings dialog into a window
52 * Massive code cleanup
53 * Re-arrangement of GTK Menus
55 * Moved Active/All filter to menu
56 * Moved Checkout All to menu
58 * Removed unnesary UI elements
59 * Switched to real inconsistent check boxes for tasks
60 * Switching the settings dialog to be more Maemo 5 like
63 * I18N, extract de.po, add ru.po.
70 __postinstall__ = """#!/bin/sh -e
72 gtk-update-icon-cache -f /usr/share/icons/hicolor
73 rm -f ~/.multilist/multilist.log
77 def find_files(path, root):
79 for unusedRoot, dirs, files in os.walk(path):
81 if file.startswith(root+"-"):
82 print "\t", root, file
83 fileParts = file.split("-")
84 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
86 relPath = os.sep.join(relPathParts)
87 yield relPath, file, newName
90 def unflatten_files(files):
92 for relPath, oldName, newName in files:
95 d[relPath].append((oldName, newName))
99 def build_package(distribution):
101 os.chdir(os.path.dirname(sys.argv[0]))
105 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
106 p = py2deb.Py2deb(__appname__)
107 p.prettyName = constants.__pretty_app_name__
108 p.description = __description__
109 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=Multilist"
110 p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
111 p.author = __author__
114 p.depends = ", ".join([
115 "python2.6 | python2.5",
116 "python-gtk2 | python2.5-gtk2",
117 "python-xml | python2.5-xml",
118 "python-dbus | python2.5-dbus",
120 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
122 "debian": ", python-glade2",
123 "diablo": maemoSpecificDepends,
124 "fremantle": maemoSpecificDepends + ", python-glade2",
128 "diablo": "user/office",
129 "fremantle": "user/office",
133 p.distribution = "diablo fremantle debian"
134 p.repository = "extras"
135 p.changelog = __changelog__
136 p.postinstall = __postinstall__
138 "debian": "26x26-multilist.png",
139 "diablo": "26x26-multilist.png",
140 "fremantle": "40x40-multilist.png", # Fremantle natively uses 48x48
142 p["/usr/bin"] = [ "multilist.py" ]
143 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
144 fullPath = "/usr/share/locale"
146 fullPath += os.sep+relPath
148 "|".join((oldName, newName))
149 for (oldName, newName) in files
151 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
152 fullPath = "/usr/lib/multilist"
154 fullPath += os.sep+relPath
156 "|".join((oldName, newName))
157 for (oldName, newName) in files
159 p["/usr/share/applications/hildon"] = ["multilist.desktop"]
160 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-multilist.png|multilist.png"]
161 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-multilist.png|multilist.png"]
162 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-multilist.png|multilist.png"]
164 if distribution == "debian":
167 version="%s-%s" % (__version__, __build__),
168 changelog=__changelog__,
174 print "Building for %s finished" % distribution
178 version="%s-%s" % (__version__, __build__),
179 changelog=__changelog__,
185 print "Building for %s finished" % distribution
188 if __name__ == "__main__":
189 if len(sys.argv) > 1:
195 if optparse is not None:
196 parser = optparse.OptionParser()
197 (commandOptions, commandArgs) = parser.parse_args()
200 commandArgs = ["diablo"]
201 build_package(commandArgs[0])