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__
26 * Fixing the application title
28 * Ctrl+i and Ctrl+o to zoom in/out the interface
29 * Ctrl+enter to fullscreen app
30 * Ctrl+l to copy to clipboard the application debug log
33 * Slight modifications to the note history and SQL dialogs
34 * On zoom, also hiding the history status and button
35 * Touched up the note list, making it ellipsize at the end rather than scroll
36 * Storing of zoom, wordwrap, and fullscreen settings
51 * improved sync, fixed a small bug
61 __postinstall__ = """#!/bin/sh -e
63 gtk-update-icon-cache -f /usr/share/icons/hicolor
64 rm -f ~/.quicknote/quicknote.log
68 def find_files(path, root):
70 for unusedRoot, dirs, files in os.walk(path):
72 if file.startswith(root+"-"):
73 print "\t", root, file
74 fileParts = file.split("-")
75 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
77 relPath = os.sep.join(relPathParts)
78 yield relPath, file, newName
81 def unflatten_files(files):
83 for relPath, oldName, newName in files:
86 d[relPath].append((oldName, newName))
90 def build_package(distribution):
92 os.chdir(os.path.dirname(sys.argv[0]))
96 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
97 p = py2deb.Py2deb(__appname__)
98 p.prettyName = constants.__pretty_app_name__
99 p.description = __description__
100 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=quicknote"
101 #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
102 p.author = __author__
105 p.depends = ", ".join([
106 "python2.6 | python2.5",
107 "python-gtk2 | python2.5-gtk2",
108 "python-xml | python2.5-xml",
110 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
112 "debian": ", python-glade2",
113 "chinook": maemoSpecificDepends,
114 "diablo": maemoSpecificDepends,
115 "fremantle": maemoSpecificDepends + ", python-glade2",
116 "mer": maemoSpecificDepends + ", python-glade2",
119 "debian": "accessories",
120 "chinook": "accessories",
121 "diablo": "user/office",
122 "fremantle": "user/office",
123 "mer": "user/office",
127 p.distribution = "chinook diablo fremantle mer debian"
128 p.repository = "extras"
129 p.changelog = __changelog__
130 p.postinstall = __postinstall__
132 "debian": "26x26-quicknote.png",
133 "chinook": "26x26-quicknote.png",
134 "diablo": "26x26-quicknote.png",
135 "fremantle": "48x48-quicknote.png", # Fremantle natively uses 48x48
136 "mer": "48x48-quicknote.png",
138 p["/usr/bin"] = [ "quicknote.py" ]
139 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
140 fullPath = "/usr/share/locale"
142 fullPath += os.sep+relPath
144 "|".join((oldName, newName))
145 for (oldName, newName) in files
147 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
148 fullPath = "/usr/lib/quicknote"
150 fullPath += os.sep+relPath
152 "|".join((oldName, newName))
153 for (oldName, newName) in files
155 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
156 #p["/usr/share/dbus-1/services"] = ["quicknote.service"]
157 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
158 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
159 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
160 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
164 version="%s-%s" % (__version__, __build__),
165 changelog=__changelog__,
171 print "Building for %s finished" % distribution
174 if __name__ == "__main__":
175 if len(sys.argv) > 1:
181 if optparse is not None:
182 parser = optparse.OptionParser()
183 (commandOptions, commandArgs) = parser.parse_args()
186 commandArgs = ["diablo"]
187 build_package(commandArgs[0])