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