Fixing some bugs with dialing
[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.6"
11 __build__ = 1
12 __changelog__ = '''
13 0.9.6
14  * Experimenting with the tabs being on the side
15  * Now the phone selector is used always, even if there is just one phone number
16  * Added a Messages Tab, which displays SMS and Voicemail messages
17  * Added option to send SMS messages
18
19 0.9.5
20  * Fixed a login issue due to Google changing their webpage
21
22 0.9.4 - ""
23  * Misc Bug fixes and experiments
24
25 0.9.3 - ""
26  * Removed the much disliked contact source ID
27  * Added saving of callback number when using GoogleVoice
28  * Got proper formatting on things ("&" rather than "&")
29  * Misc Bug fixes
30
31 0.9.2 - "Two heads are better than one"
32  * Adding of UI to switch between GC and GV
33  * Minimized flashing the dial button between grayed out and not on startup
34  * Bug fixes
35
36 0.9.1 - "Get your hands off that"
37  * GoogleVoice Support, what a pain
38  * More flexible CSV support.  It now checks the header row for what column name/number are in
39  * Experimenting with faster startup by caching PYC files with the package
40  * Fixing of some bad error handling
41  * More debug output for when people run into issues
42
43 0.9.0 - "Slick as snot"
44  * Caching of contacts
45  * Refactoring to make working with the code easier
46  * Filesystem backed contacts but currently only supporting a specific csv format
47  * Gracefully handle lack of connection and connection transitions
48  * Gracefully handle failed login
49  * A tiny bit better error reporting
50
51 0.8.3 - "Extras Love"
52  * Version bump fighting the extras autobuilder, I hope this works
53
54 0.8.2 - "Feed is for horses, so what about feedback?"
55  * Merged addressbook
56  * many more smaller fixes
57
58 0.8.1 - "Two Beers"
59  * Thumb scrollbars ( Kudos Khertan )
60
61 0.8.0 - "Spit and polish"
62  * Addressbook support
63  * threaded networking for better interactivity
64  * Hold down back to clear number
65  * Standard about dialog
66  * many more smaller fixes
67 '''
68
69
70 __postinstall__ = '''#!/bin/sh
71
72 gtk-update-icon-cache /usr/share/icons/hicolor
73 '''
74
75
76 def find_files(path):
77         for root, dirs, files in os.walk(path):
78                 for file in files:
79                         if file.startswith("src-"):
80                                 fileParts = file.split("-")
81                                 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
82                                 assert unused == "src"
83                                 relPath = os.sep.join(relPathParts)
84                                 yield relPath, file, newName
85
86
87 def unflatten_files(files):
88         d = {}
89         for relPath, oldName, newName in files:
90                 if relPath not in d:
91                         d[relPath] = []
92                 d[relPath].append((oldName, newName))
93         return d
94
95
96 if __name__ == "__main__":
97         try:
98                 os.chdir(os.path.dirname(sys.argv[0]))
99         except:
100                 pass
101
102         p = Py2deb(__appname__)
103         p.description = __description__
104         p.author = __author__
105         p.mail = __email__
106         p.license = "lgpl"
107         p.depends = "python2.5, python2.5-gtk2, python2.5-xml"
108         p.section = "user/communication"
109         p.arch = "all"
110         p.urgency = "low"
111         p.distribution = "chinook diablo"
112         p.repository = "extras-devel"
113         p.changelog = __changelog__
114         p.postinstall = __postinstall__
115         p.icon="26x26-dialcentral.png"
116         p["/usr/bin"] = [ "dialcentral.py" ]
117         for relPath, files in unflatten_files(find_files(".")).iteritems():
118                 fullPath = "/usr/lib/dialcentral"
119                 if relPath:
120                         fullPath += os.sep+relPath
121                 p[fullPath] = list(
122                         "|".join((oldName, newName))
123                         for (oldName, newName) in files
124                 )
125         p["/usr/share/applications/hildon"] = ["dialcentral.desktop"]
126         p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-dialcentral.png|dialcentral.png"]
127         p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-dialcentral.png|dialcentral.png"]
128         p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-dialcentral.png|dialcentral.png"]
129
130         print p
131         print p.generate(
132                 __version__, __build__, changelog=__changelog__,
133                 tar=True, dsc=True, changes=True, build=False, src=True
134         )