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