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