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__
23 * Fixing the application title
26 * Slight modifications to the note history and SQL dialogs
27 * On zoom, also hiding the history status and button
28 * Touched up the note list, making it ellipsize at the end rather than scroll
29 * Storing of zoom, wordwrap, and fullscreen settings
44 * improved sync, fixed a small bug
54 __postinstall__ = '''#!/bin/sh -e
56 gtk-update-icon-cache -f /usr/share/icons/hicolor
61 def find_files(path, root):
63 for unusedRoot, dirs, files in os.walk(path):
65 if file.startswith(root+"-"):
66 print "\t", root, file
67 fileParts = file.split("-")
68 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
70 relPath = os.sep.join(relPathParts)
71 yield relPath, file, newName
74 def unflatten_files(files):
76 for relPath, oldName, newName in files:
79 d[relPath].append((oldName, newName))
83 def build_package(distribution):
85 os.chdir(os.path.dirname(sys.argv[0]))
89 p = py2deb.Py2deb(__appname__)
90 p.description = __description__
95 "diablo": "python2.5, python2.5-gtk2",
96 "mer": "python2.6, python-gtk2",
98 p.section = "user/other"
101 p.distribution = "chinook diablo fremantle mer"
102 p.repository = "extras"
103 p.changelog = __changelog__
104 p.postinstall = __postinstall__
105 p.icon = "26x26-quicknote.png"
106 p["/usr/bin"] = [ "quicknote.py" ]
107 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
108 fullPath = "/usr/share/locale"
110 fullPath += os.sep+relPath
112 "|".join((oldName, newName))
113 for (oldName, newName) in files
115 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
116 fullPath = "/usr/lib/quicknote"
118 fullPath += os.sep+relPath
120 "|".join((oldName, newName))
121 for (oldName, newName) in files
123 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
124 p["/usr/share/dbus-1/services"] = ["quicknote.service"]
125 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
126 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
127 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
128 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
132 __version__, __build__, changelog=__changelog__,
133 tar=True, dsc=True, changes=True, build=False, src=True
135 print "Building for %s finished" % distribution
138 if __name__ == "__main__":
139 if len(sys.argv) > 1:
145 if optparse is not None:
146 parser = optparse.OptionParser()
147 (commandOptions, commandArgs) = parser.parse_args()
150 commandArgs = ["diablo"]
151 build_package(commandArgs[0])