9 import fake_py2deb as py2deb
14 __appname__ = constants.__app_name__
15 __description__ = """Simple note taking application in a similar vein as PalmOS Memos
17 Homepage: http://quicknote.garage.maemo.org/
19 __author__ = "Christoph Wurstle"
20 __email__ = "n800@axique.net"
21 __version__ = constants.__version__
22 __build__ = constants.__build__
25 * Tiny speed improvement to startup
28 * Moved history to the (app)menu
29 * Moved search to Ctrl+f and (app)menu
30 * Switched category selection over to a touch selector entry, making it prettier and easier
31 * Deleting empty notes no longer prompts the user
32 * Cleaned up the history dialog a smidge
34 * Bug fix: not very consistent when a category is visible in dialogs
37 * UI Tweak: Removed "New Note..." due to weirdness and duplicated behavior
38 * UI Tweak: Added App Menu to access some category functionality
39 * Bugfix: Move To Category
40 * Bugfix: Removed carriage return on Ctrl+Enter
41 * Added .deb package support
44 * Spell checking (Desktop only)
45 * Fixing the application title
47 * Ctrl+i and Ctrl+o to zoom in/out the interface
48 * Ctrl+enter to fullscreen app
49 * Ctrl+l to copy to clipboard the application debug log
52 * Slight modifications to the note history and SQL dialogs
53 * On zoom, also hiding the history status and button
54 * Touched up the note list, making it ellipsize at the end rather than scroll
55 * Storing of zoom, wordwrap, and fullscreen settings
70 * improved sync, fixed a small bug
80 __postinstall__ = """#!/bin/sh -e
82 gtk-update-icon-cache -f /usr/share/icons/hicolor
83 rm -f ~/.quicknote/quicknote.log
87 def find_files(path, root):
89 for unusedRoot, dirs, files in os.walk(path):
91 if file.startswith(root+"-"):
92 print "\t", root, file
93 fileParts = file.split("-")
94 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
96 relPath = os.sep.join(relPathParts)
97 yield relPath, file, newName
100 def unflatten_files(files):
102 for relPath, oldName, newName in files:
105 d[relPath].append((oldName, newName))
109 def build_package(distribution):
111 os.chdir(os.path.dirname(sys.argv[0]))
115 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
116 p = py2deb.Py2deb(__appname__)
117 p.prettyName = constants.__pretty_app_name__
118 p.description = __description__
119 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=quicknote"
120 p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
121 p.author = __author__
124 p.depends = ", ".join([
125 "python2.6 | python2.5",
126 "python-gtk2 | python2.5-gtk2",
127 "python-xml | python2.5-xml",
128 "python-dbus | python2.5-dbus",
130 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
132 "debian": ", python-glade2",
133 "chinook": maemoSpecificDepends,
134 "diablo": maemoSpecificDepends,
135 "fremantle": maemoSpecificDepends + ", python-glade2",
136 "mer": maemoSpecificDepends + ", python-glade2",
140 "chinook": "accessories",
141 "diablo": "user/office",
142 "fremantle": "user/office",
143 "mer": "user/office",
147 p.distribution = "chinook diablo fremantle mer debian"
148 p.repository = "extras"
149 p.changelog = __changelog__
150 p.postinstall = __postinstall__
152 "debian": "26x26-quicknote.png",
153 "chinook": "26x26-quicknote.png",
154 "diablo": "26x26-quicknote.png",
155 "fremantle": "48x48-quicknote.png", # Fremantle natively uses 48x48
156 "mer": "48x48-quicknote.png",
158 p["/usr/bin"] = [ "quicknote.py" ]
159 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
160 fullPath = "/usr/share/locale"
162 fullPath += os.sep+relPath
164 "|".join((oldName, newName))
165 for (oldName, newName) in files
167 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
168 fullPath = "/usr/lib/quicknote"
170 fullPath += os.sep+relPath
172 "|".join((oldName, newName))
173 for (oldName, newName) in files
175 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
176 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
177 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
178 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
179 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
181 if distribution == "debian":
184 version="%s-%s" % (__version__, __build__),
185 changelog=__changelog__,
191 print "Building for %s finished" % distribution
195 version="%s-%s" % (__version__, __build__),
196 changelog=__changelog__,
202 print "Building for %s finished" % distribution
205 if __name__ == "__main__":
206 if len(sys.argv) > 1:
212 if optparse is not None:
213 parser = optparse.OptionParser()
214 (commandOptions, commandArgs) = parser.parse_args()
217 commandArgs = ["diablo"]
218 build_package(commandArgs[0])