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 "diablo": maemoSpecificDepends,
134 "fremantle": maemoSpecificDepends + ", python-glade2",
138 "diablo": "user/office",
139 "fremantle": "user/office",
143 p.distribution = "diablo fremantle debian"
144 p.repository = "extras"
145 p.changelog = __changelog__
146 p.postinstall = __postinstall__
148 "debian": "26x26-quicknote.png",
149 "diablo": "26x26-quicknote.png",
150 "fremantle": "48x48-quicknote.png", # Fremantle natively uses 48x48
152 p["/usr/bin"] = [ "quicknote.py" ]
153 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
154 fullPath = "/usr/share/locale"
156 fullPath += os.sep+relPath
158 "|".join((oldName, newName))
159 for (oldName, newName) in files
161 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
162 fullPath = "/usr/lib/quicknote"
164 fullPath += os.sep+relPath
166 "|".join((oldName, newName))
167 for (oldName, newName) in files
169 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
170 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
171 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
172 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
173 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
175 if distribution == "debian":
178 version="%s-%s" % (__version__, __build__),
179 changelog=__changelog__,
185 print "Building for %s finished" % distribution
189 version="%s-%s" % (__version__, __build__),
190 changelog=__changelog__,
196 print "Building for %s finished" % distribution
199 if __name__ == "__main__":
200 if len(sys.argv) > 1:
206 if optparse is not None:
207 parser = optparse.OptionParser()
208 (commandOptions, commandArgs) = parser.parse_args()
211 commandArgs = ["diablo"]
212 build_package(commandArgs[0])