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__
25 * Slight modifications to the note history and SQL dialogs
26 * On zoom, also hiding the history status and button
27 * Touched up the note list, making it ellipsize at the end rather than scroll
28 * Storing of zoom, wordwrap, and fullscreen settings
43 * improved sync, fixed a small bug
53 __postinstall__ = '''#!/bin/sh -e
55 gtk-update-icon-cache -f /usr/share/icons/hicolor
60 def find_files(path, root):
62 for unusedRoot, dirs, files in os.walk(path):
64 if file.startswith(root+"-"):
65 print "\t", root, file
66 fileParts = file.split("-")
67 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
69 relPath = os.sep.join(relPathParts)
70 yield relPath, file, newName
73 def unflatten_files(files):
75 for relPath, oldName, newName in files:
78 d[relPath].append((oldName, newName))
82 def build_package(distribution):
84 os.chdir(os.path.dirname(sys.argv[0]))
88 p = py2deb.Py2deb(__appname__)
89 p.description = __description__
94 "diablo": "python2.5, python2.5-gtk2",
95 "mer": "python2.6, python-gtk2",
97 p.section = "user/other"
100 p.distribution = "chinook diablo fremantle mer"
101 p.repository = "extras"
102 p.changelog = __changelog__
103 p.postinstall = __postinstall__
104 p.icon = "26x26-quicknote.png"
105 p["/usr/bin"] = [ "quicknote.py" ]
106 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
107 fullPath = "/usr/share/locale"
109 fullPath += os.sep+relPath
111 "|".join((oldName, newName))
112 for (oldName, newName) in files
114 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
115 fullPath = "/usr/lib/quicknote"
117 fullPath += os.sep+relPath
119 "|".join((oldName, newName))
120 for (oldName, newName) in files
122 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
123 p["/usr/share/dbus-1/services"] = ["quicknote.service"]
124 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
125 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
126 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
127 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
131 __version__, __build__, changelog=__changelog__,
132 tar=True, dsc=True, changes=True, build=False, src=True
134 print "Building for %s finished" % distribution
137 if __name__ == "__main__":
138 if len(sys.argv) > 1:
144 if optparse is not None:
145 parser = optparse.OptionParser()
146 (commandOptions, commandArgs) = parser.parse_args()
149 commandArgs = ["diablo"]
150 build_package(commandArgs[0])