9 import fake_py2deb as py2deb
14 __appname__ = constants.__app_name__
15 __description__ = "Simple note taking application in a similar vein as PalmOS Memos"
16 __author__ = "Christoph Wurstle"
17 __email__ = "n800@axique.net"
18 __version__ = constants.__version__
24 * Slight modifications to the note history and SQL dialogs
25 * On zoom, also hiding the history status and button
26 * Touched up the note list, making it ellipsize at the end rather than scroll
27 * Storing of zoom, wordwrap, and fullscreen settings
42 * improved sync, fixed a small bug
52 __postinstall__ = '''#!/bin/sh -e
54 gtk-update-icon-cache -f /usr/share/icons/hicolor
59 def find_files(path, root):
61 for unusedRoot, dirs, files in os.walk(path):
63 if file.startswith(root+"-"):
64 print "\t", root, file
65 fileParts = file.split("-")
66 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
68 relPath = os.sep.join(relPathParts)
69 yield relPath, file, newName
72 def unflatten_files(files):
74 for relPath, oldName, newName in files:
77 d[relPath].append((oldName, newName))
81 def build_package(distribution):
83 os.chdir(os.path.dirname(sys.argv[0]))
87 p = py2deb.Py2deb(__appname__)
88 p.description = __description__
93 "diablo": "python2.5, python2.5-gtk2",
94 "mer": "python2.6, python-gtk2",
96 p.section = "user/other"
99 p.distribution = "chinook diablo fremantle mer"
100 p.repository = "extras"
101 p.changelog = __changelog__
102 p.postinstall = __postinstall__
103 p.icon = "26x26-quicknote.png"
104 p["/usr/bin"] = [ "quicknote.py" ]
105 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
106 fullPath = "/usr/share/locale"
108 fullPath += os.sep+relPath
110 "|".join((oldName, newName))
111 for (oldName, newName) in files
113 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
114 fullPath = "/usr/lib/quicknote"
116 fullPath += os.sep+relPath
118 "|".join((oldName, newName))
119 for (oldName, newName) in files
121 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
122 p["/usr/share/dbus-1/services"] = ["quicknote.service"]
123 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
124 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
125 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
126 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
130 __version__, __build__, changelog=__changelog__,
131 tar=True, dsc=True, changes=True, build=False, src=True
133 print "Building for %s finished" % distribution
136 if __name__ == "__main__":
137 if len(sys.argv) > 1:
143 if optparse is not None:
144 parser = optparse.OptionParser()
145 (commandOptions, commandArgs) = parser.parse_args()
148 commandArgs = ["diablo"]
149 build_package(commandArgs[0])