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