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 * UI Tweak: Removed "New Note..." due to weirdness and duplicated behavior
26 * Bugfix: Move To Category
30 * Fixing the application title
32 * Ctrl+i and Ctrl+o to zoom in/out the interface
33 * Ctrl+enter to fullscreen app
34 * Ctrl+l to copy to clipboard the application debug log
37 * Slight modifications to the note history and SQL dialogs
38 * On zoom, also hiding the history status and button
39 * Touched up the note list, making it ellipsize at the end rather than scroll
40 * Storing of zoom, wordwrap, and fullscreen settings
55 * improved sync, fixed a small bug
65 __postinstall__ = """#!/bin/sh -e
67 gtk-update-icon-cache -f /usr/share/icons/hicolor
68 rm -f ~/.quicknote/quicknote.log
72 def find_files(path, root):
74 for unusedRoot, dirs, files in os.walk(path):
76 if file.startswith(root+"-"):
77 print "\t", root, file
78 fileParts = file.split("-")
79 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
81 relPath = os.sep.join(relPathParts)
82 yield relPath, file, newName
85 def unflatten_files(files):
87 for relPath, oldName, newName in files:
90 d[relPath].append((oldName, newName))
94 def build_package(distribution):
96 os.chdir(os.path.dirname(sys.argv[0]))
100 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
101 p = py2deb.Py2deb(__appname__)
102 p.prettyName = constants.__pretty_app_name__
103 p.description = __description__
104 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=quicknote"
105 #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
106 p.author = __author__
109 p.depends = ", ".join([
110 "python2.6 | python2.5",
111 "python-gtk2 | python2.5-gtk2",
112 "python-xml | python2.5-xml",
114 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
116 "debian": ", python-glade2",
117 "chinook": maemoSpecificDepends,
118 "diablo": maemoSpecificDepends,
119 "fremantle": maemoSpecificDepends + ", python-glade2",
120 "mer": maemoSpecificDepends + ", python-glade2",
124 "chinook": "accessories",
125 "diablo": "user/office",
126 "fremantle": "user/office",
127 "mer": "user/office",
131 p.distribution = "chinook diablo fremantle mer debian"
132 p.repository = "extras"
133 p.changelog = __changelog__
134 p.postinstall = __postinstall__
136 "debian": "26x26-quicknote.png",
137 "chinook": "26x26-quicknote.png",
138 "diablo": "26x26-quicknote.png",
139 "fremantle": "48x48-quicknote.png", # Fremantle natively uses 48x48
140 "mer": "48x48-quicknote.png",
142 p["/usr/bin"] = [ "quicknote.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/quicknote"
154 fullPath += os.sep+relPath
156 "|".join((oldName, newName))
157 for (oldName, newName) in files
159 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
160 #p["/usr/share/dbus-1/services"] = ["quicknote.service"]
161 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
162 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
163 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
164 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
168 version="%s-%s" % (__version__, __build__),
169 changelog=__changelog__,
175 print "Building for %s finished" % distribution
178 if __name__ == "__main__":
179 if len(sys.argv) > 1:
185 if optparse is not None:
186 parser = optparse.OptionParser()
187 (commandOptions, commandArgs) = parser.parse_args()
190 commandArgs = ["diablo"]
191 build_package(commandArgs[0])