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