8 import fake_py2deb as py2deb
11 __appname__ = "quicknote"
12 __description__ = "Simple note taking application in a similar vein as PalmOS Memos"
13 __author__ = "Christoph Wurstle"
14 __email__ = "n800@axique.net"
31 * improved sync, fixed a small bug
41 __postinstall__ = '''#!/bin/sh -e
43 gtk-update-icon-cache -f /usr/share/icons/hicolor
48 def find_files(path, root):
50 for unusedRoot, dirs, files in os.walk(path):
52 if file.startswith(root+"-"):
53 print "\t", root, file
54 fileParts = file.split("-")
55 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
57 relPath = os.sep.join(relPathParts)
58 yield relPath, file, newName
61 def unflatten_files(files):
63 for relPath, oldName, newName in files:
66 d[relPath].append((oldName, newName))
70 if __name__ == "__main__":
72 os.chdir(os.path.dirname(sys.argv[0]))
76 p = py2deb.Py2deb(__appname__)
77 p.description = __description__
81 p.depends = "python2.5, python2.5-gtk2"
82 p.section = "user/other"
85 p.distribution = "chinook diablo"
86 p.repository = "extras-devel"
87 p.changelog = __changelog__
88 p.postinstall = __postinstall__
89 p.icon = "26x26-quicknote.png"
90 p["/usr/bin"] = [ "quicknote.py" ]
91 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
92 fullPath = "/usr/share/locale"
94 fullPath += os.sep+relPath
96 "|".join((oldName, newName))
97 for (oldName, newName) in files
99 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
100 fullPath = "/usr/lib/quicknote"
102 fullPath += os.sep+relPath
104 "|".join((oldName, newName))
105 for (oldName, newName) in files
107 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
108 p["/usr/share/dbus-1/services"] = ["quicknote.service"]
109 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
110 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
111 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
112 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
116 __version__, __build__, changelog=__changelog__,
117 tar=True, dsc=True, changes=True, build=False, src=True