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 * Saves the filter on restart
26 * Search finds text in the middle of titles, not just the beginning
27 * Import/Export (import appends rather than merges for now)
30 * Added panning [removed due not being able to edit]
33 * Fixed a typo (loss of db with this)
34 * Switched to a spinner and switched unit to a combo
37 * Fixed check boxes on Maemo
40 * Corrected the bug tracker link
43 * Adding filtering for new and complete in addition to all and active
46 * Bugfix: Fixing the application launcher
49 * Making rotation configurable in the Settings window
50 * Persisting full-screen / rotation settings
54 * Turned the settings dialog into a window
57 * Massive code cleanup
58 * Re-arrangement of GTK Menus
60 * Moved Active/All filter to menu
61 * Moved Checkout All to menu
63 * Removed unnesary UI elements
64 * Switched to real inconsistent check boxes for tasks
65 * Switching the settings dialog to be more Maemo 5 like
68 * I18N, extract de.po, add ru.po.
75 __postinstall__ = """#!/bin/sh -e
77 gtk-update-icon-cache -f /usr/share/icons/hicolor
78 rm -f ~/.multilist/multilist.log
82 def find_files(path, root):
84 for unusedRoot, dirs, files in os.walk(path):
86 if file.startswith(root+"-"):
87 print "\t", root, file
88 fileParts = file.split("-")
89 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
91 relPath = os.sep.join(relPathParts)
92 yield relPath, file, newName
95 def unflatten_files(files):
97 for relPath, oldName, newName in files:
100 d[relPath].append((oldName, newName))
104 def build_package(distribution):
106 os.chdir(os.path.dirname(sys.argv[0]))
110 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
111 p = py2deb.Py2deb(__appname__)
112 p.prettyName = constants.__pretty_app_name__
113 p.description = __description__
114 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=Multilist"
115 p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
116 p.author = __author__
119 p.depends = ", ".join([
120 "python2.6 | python2.5",
121 "python-gtk2 | python2.5-gtk2",
122 "python-xml | python2.5-xml",
123 "python-dbus | python2.5-dbus",
125 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
127 "debian": ", python-glade2",
128 "diablo": maemoSpecificDepends,
129 "fremantle": maemoSpecificDepends + ", python-glade2",
133 "diablo": "user/office",
134 "fremantle": "user/office",
138 p.distribution = "diablo fremantle debian"
139 p.repository = "extras"
140 p.changelog = __changelog__
141 p.postinstall = __postinstall__
143 "debian": "26x26-multilist.png",
144 "diablo": "26x26-multilist.png",
145 "fremantle": "40x40-multilist.png", # Fremantle natively uses 48x48
147 p["/usr/bin"] = [ "multilist.py" ]
148 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
149 fullPath = "/usr/share/locale"
151 fullPath += os.sep+relPath
153 "|".join((oldName, newName))
154 for (oldName, newName) in files
156 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
157 fullPath = "/usr/lib/multilist"
159 fullPath += os.sep+relPath
161 "|".join((oldName, newName))
162 for (oldName, newName) in files
164 p["/usr/share/applications/hildon"] = ["multilist.desktop"]
165 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-multilist.png|multilist.png"]
166 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-multilist.png|multilist.png"]
167 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-multilist.png|multilist.png"]
169 if distribution == "debian":
172 version="%s-%s" % (__version__, __build__),
173 changelog=__changelog__,
179 print "Building for %s finished" % distribution
183 version="%s-%s" % (__version__, __build__),
184 changelog=__changelog__,
190 print "Building for %s finished" % distribution
193 if __name__ == "__main__":
194 if len(sys.argv) > 1:
200 if optparse is not None:
201 parser = optparse.OptionParser()
202 (commandOptions, commandArgs) = parser.parse_args()
205 commandArgs = ["diablo"]
206 build_package(commandArgs[0])