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