Autogenerating todos
[gc-dialer] / support / builddeb.py
1 #!/usr/bin/python2.5
2
3 from py2deb import *
4
5
6 __appname__ = "dialcentral"
7 __description__ = "Simple interface to Google's GrandCentral(tm) service"
8 __author__ = "Ed Page"
9 __email__ = "eopage@byu.net"
10 __version__ = "0.9.2"
11 __build__ = 0
12 __changelog__ = '''\
13 0.9.2 - "Two heads are better than one"
14  * Adding of UI to switch between GC and GV
15  * Minimized flashing the dial button between grayed out and not on startup
16  * Bug fixes
17
18 0.9.1 - "Get your hands off that"
19  * GoogleVoice Support, what a pain
20  * More flexible CSV support.  It now checks the header row for what column name/number are in
21  * Experimenting with faster startup by caching PYC files with the package
22  * Fixing of some bad error handling
23  * More debug output for when people run into issues
24
25 0.9.0 - "Slick as snot"
26  * Caching of contacts
27  * Refactoring to make working with the code easier
28  * Filesystem backed contacts but currently only supporting a specific csv format
29  * Gracefully handle lack of connection and connection transitions
30  * Gracefully handle failed login
31  * A tiny bit better error reporting
32
33 0.8.3 - "Extras Love"
34  * Version bump fighting the extras autobuilder, I hope this works
35
36 0.8.2 - "Feed is for horses, so what about feedback?"
37  * Merged addressbook
38  * many more smaller fixes
39
40 0.8.1 - "Two Beers"
41  * Thumb scrollbars ( Kudos Khertan )
42
43 0.8.0 - "Spit and polish"
44  * Addressbook support
45  * threaded networking for better interactivity
46  * Hold down back to clear number
47  * Standard about dialog
48  * many more smaller fixes
49 '''
50
51
52 __postinstall__ = '''#!/bin/sh
53
54 gtk-update-icon-cache /usr/share/icons/hicolor
55 '''
56
57
58 def find_files(path):
59         for root, dirs, files in os.walk(path):
60                 for file in files:
61                         if file.startswith("src-"):
62                                 fileParts = file.split("-")
63                                 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
64                                 assert unused == "src"
65                                 relPath = os.sep.join(relPathParts)
66                                 yield relPath, file, newName
67
68
69 def unflatten_files(files):
70         d = {}
71         for relPath, oldName, newName in files:
72                 if relPath not in d:
73                         d[relPath] = []
74                 d[relPath].append((oldName, newName))
75         return d
76
77
78 if __name__ == "__main__":
79         try:
80                 os.chdir(os.path.dirname(sys.argv[0]))
81         except:
82                 pass
83
84         p = Py2deb(__appname__)
85         p.description = __description__
86         p.author = __author__
87         p.mail = __email__
88         p.license = "lgpl"
89         p.depends = "python2.5, python2.5-gtk2"
90         p.section = "user/network"
91         p.arch = "all"
92         p.urgency = "low"
93         p.distribution = "chinook diablo"
94         p.repository = "extras-devel"
95         p.changelog = __changelog__
96         p.postinstall = __postinstall__
97         p.icon="26x26-dialcentral.png"
98         p["/usr/bin"] = [ "dialcentral.py" ]
99         for relPath, files in unflatten_files(find_files(".")).iteritems():
100                 fullPath = "/usr/lib/dialcentral"
101                 if relPath:
102                         fullPath += os.sep+relPath
103                 p[fullPath] = list(
104                         "|".join((oldName, newName))
105                         for (oldName, newName) in files
106                 )
107         p["/usr/share/applications/hildon"] = ["dialcentral.desktop"]
108         p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-dialcentral.png|dialcentral.png"]
109         p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-dialcentral.png|dialcentral.png"]
110         p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-dialcentral.png|dialcentral.png"]
111
112         print p
113         print p.generate(
114                 __version__, __build__, changelog=__changelog__,
115                 tar=True, dsc=True, changes=True, build=False, src=True
116         )