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"
33 * improved sync, fixed a small bug
43 __postinstall__ = '''#!/bin/sh -e
45 gtk-update-icon-cache -f /usr/share/icons/hicolor
50 def find_files(path, root):
52 for unusedRoot, dirs, files in os.walk(path):
54 if file.startswith(root+"-"):
55 print "\t", root, file
56 fileParts = file.split("-")
57 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
59 relPath = os.sep.join(relPathParts)
60 yield relPath, file, newName
63 def unflatten_files(files):
65 for relPath, oldName, newName in files:
68 d[relPath].append((oldName, newName))
72 if __name__ == "__main__":
74 os.chdir(os.path.dirname(sys.argv[0]))
78 p = py2deb.Py2deb(__appname__)
79 p.description = __description__
83 p.depends = "python2.5, python2.5-gtk2"
84 p.section = "user/other"
87 p.distribution = "chinook diablo"
88 p.repository = "extras-devel"
89 p.changelog = __changelog__
90 p.postinstall = __postinstall__
91 p.icon = "26x26-quicknote.png"
92 p["/usr/bin"] = [ "quicknote.py" ]
93 for relPath, files in unflatten_files(find_files(".", "locale")).iteritems():
94 fullPath = "/usr/share/locale"
96 fullPath += os.sep+relPath
98 "|".join((oldName, newName))
99 for (oldName, newName) in files
101 for relPath, files in unflatten_files(find_files(".", "src")).iteritems():
102 fullPath = "/usr/lib/quicknote"
104 fullPath += os.sep+relPath
106 "|".join((oldName, newName))
107 for (oldName, newName) in files
109 p["/usr/share/applications/hildon"] = ["quicknote.desktop"]
110 p["/usr/share/dbus-1/services"] = ["quicknote.service"]
111 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-quicknote.png|quicknote.png"]
112 p["/usr/share/icons/hicolor/40x40/hildon"] = ["40x40-quicknote.png|quicknote.png"]
113 p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-quicknote.png|quicknote.png"]
114 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-quicknote.png|quicknote.png"]
118 __version__, __build__, changelog=__changelog__,
119 tar=True, dsc=True, changes=True, build=False, src=True