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