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__
26 * Turned the settings dialog into a window
29 * Massive code cleanup
30 * Re-arrangement of GTK Menus
32 * Moved Active/All filter to menu
33 * Moved Checkout All to menu
35 * Removed unnesary UI elements
36 * Switched to real inconsistent check boxes for tasks
37 * Switching the settings dialog to be more Maemo 5 like
40 * I18N, extract de.po, add ru.po.
47 __postinstall__ = """#!/bin/sh -e
49 gtk-update-icon-cache -f /usr/share/icons/hicolor
50 rm -f ~/.multilist/multilist.log
54 def find_files(path, root):
56 for unusedRoot, dirs, files in os.walk(path):
58 if file.startswith(root+"-"):
59 print "\t", root, file
60 fileParts = file.split("-")
61 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
63 relPath = os.sep.join(relPathParts)
64 yield relPath, file, newName
67 def unflatten_files(files):
69 for relPath, oldName, newName in files:
72 d[relPath].append((oldName, newName))
76 def build_package(distribution):
78 os.chdir(os.path.dirname(sys.argv[0]))
82 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
83 p = py2deb.Py2deb(__appname__)
84 p.prettyName = constants.__pretty_app_name__
85 p.description = __description__
86 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=quicknote"
87 p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
91 p.depends = ", ".join([
92 "python2.6 | python2.5",
93 "python-gtk2 | python2.5-gtk2",
94 "python-xml | python2.5-xml",
95 "python-dbus | python2.5-dbus",
97 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
99 "debian": ", python-glade2",
100 "diablo": maemoSpecificDepends,
101 "fremantle": maemoSpecificDepends + ", python-glade2",
105 "diablo": "user/office",
106 "fremantle": "user/office",
110 p.distribution = "diablo fremantle debian"
111 p.repository = "extras"
112 p.changelog = __changelog__
113 p.postinstall = __postinstall__
115 "debian": "26x26-multilist.png",
116 "diablo": "26x26-multilist.png",
117 "fremantle": "40x40-multilist.png", # Fremantle natively uses 48x48
119 p["/usr/bin"] = [ "multilist.py" ]
120 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
121 fullPath = "/usr/share/locale"
123 fullPath += os.sep+relPath
125 "|".join((oldName, newName))
126 for (oldName, newName) in files
128 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
129 fullPath = "/usr/lib/multilist"
131 fullPath += os.sep+relPath
133 "|".join((oldName, newName))
134 for (oldName, newName) in files
136 p["/usr/share/applications/hildon"] = ["multilist.desktop"]
137 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-multilist.png|multilist.png"]
138 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-multilist.png|multilist.png"]
139 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-multilist.png|multilist.png"]
141 if distribution == "debian":
144 version="%s-%s" % (__version__, __build__),
145 changelog=__changelog__,
151 print "Building for %s finished" % distribution
155 version="%s-%s" % (__version__, __build__),
156 changelog=__changelog__,
162 print "Building for %s finished" % distribution
165 if __name__ == "__main__":
166 if len(sys.argv) > 1:
172 if optparse is not None:
173 parser = optparse.OptionParser()
174 (commandOptions, commandArgs) = parser.parse_args()
177 commandArgs = ["diablo"]
178 build_package(commandArgs[0])