Updating the raise style used in the rtm library Im using
[doneit] / support / builddeb.py
1 #!/usr/bin/python2.5
2
3 from py2deb import *
4
5
6 __appname__ = "doneit"
7 __description__ = "Todo Manager"
8 __author__ = "Ed Page"
9 __email__ = "eopage@byu.net"
10 __version__ = "0.3.1"
11 __build__ = 0
12 __changelog__ = '''\
13 0.3.1
14  * Fixed bug where if you had no backend enabled, you couldn't enable a backend (Now hit "Connect" in the "File" menu)
15  * Fixed some polish bugs with the popup calendar
16  * Caching added to RTM backend
17
18 0.3.0
19  * Initial Release
20  * Backend Support: Remember The Milk
21  * Completing of tasks
22  * Browse to task URLs
23  * Task editing:
24    * Task list
25    * Task Name
26    * Task Priority
27    * Task Due Date
28  * Note Viewer / Editor
29  * Not supported:
30    * Adding, renaming, and (un)archiving of lists
31    * Uncompleting a task and viewing completed tasks
32    * Viewing/editing of task recurrence, time estimate, tags, location, url
33    * Postponing tasks
34    * Due time
35 '''
36
37
38 __postinstall__ = '''#!/bin/sh
39
40 gtk-update-icon-cache /usr/share/icons/hicolor
41 '''
42
43
44 def find_files(path):
45         for root, dirs, files in os.walk(path):
46                 for file in files:
47                         if file.startswith("src-"):
48                                 fileParts = file.split("-")
49                                 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
50                                 assert unused == "src"
51                                 relPath = os.sep.join(relPathParts)
52                                 yield relPath, file, newName
53
54
55 def unflatten_files(files):
56         d = {}
57         for relPath, oldName, newName in files:
58                 if relPath not in d:
59                         d[relPath] = []
60                 d[relPath].append((oldName, newName))
61         return d
62
63
64 if __name__ == "__main__":
65         try:
66                 os.chdir(os.path.dirname(sys.argv[0]))
67         except:
68                 pass
69
70         p = Py2deb(__appname__)
71         p.description = __description__
72         p.author = __author__
73         p.mail = __email__
74         p.license = "lgpl"
75         p.depends = "python2.5, python2.5-gtk2"
76         p.section = "user/communication"
77         p.arch = "all"
78         p.urgency = "low"
79         p.distribution = "chinook diablo"
80         p.repository = "extras-devel"
81         p.changelog = __changelog__
82         p.postinstall = __postinstall__
83         p.icon="26x26-doneit.png"
84         p["/usr/bin"] = [ "doneit.py" ]
85         for relPath, files in unflatten_files(find_files(".")).iteritems():
86                 fullPath = "/usr/lib/doneit"
87                 if relPath:
88                         fullPath += os.sep+relPath
89                 p[fullPath] = list(
90                         "|".join((oldName, newName))
91                         for (oldName, newName) in files
92                 )
93         p["/usr/share/applications/hildon"] = ["doneit.desktop"]
94         # p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-doneit.png|doneit.png"]
95         # p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-doneit.png|doneit.png"]
96         # p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-doneit.png|doneit.png"]
97
98         print p
99         print p.generate(
100                 __version__, __build__, changelog=__changelog__,
101                 tar=True, dsc=True, changes=True, build=False, src=True
102         )