9 import fake_py2deb as py2deb
14 __appname__ = constants.__app_name__
15 __description__ = """Send/receive texts and initiate GV callbacks all through Conversations and Phone
18 * Send Texts and Receive both Texts and Voicemail through your chat window (buggy on Maemo 4.1)
20 * Initiate Google Voice callbacks from the dialpad or your contacts
22 * Access to all of your Google Voice contacts (Maemo 4.1 only for now)
24 * Reduce battery drain by setting your status to "Away"
26 * Block incoming calls by switching your status to "Hidden"
28 Note: Google and Google Voice are probably trademarks of Google. This software nor the author has any affiliation with Google
30 Homepage: http://theonering.garage.maemo.org
32 __author__ = "Ed Page"
33 __email__ = "eopage@byu.net"
34 __version__ = constants.__version__
35 __build__ = constants.__build__
38 * Reduced time allowed for disconnect due to RTComm not putting TOR on hold, causing miss of callback
39 * Doubled the timed disconnects time
40 * Cleaning up things to better match the latest Empathy
41 * Bugfix: Random "General Error"s when making a call
44 * "Hold" support for calls, so that initiating a callback does not block incoming calls
45 * Increased the auto-cleanup timeout from 5 seconds to 10 seconds
48 * Improved debug logs, removing noise
49 * Reduced allotted disconnect time from 5 seconds to 2
50 * Auto-cleanup resources when client only does phase 1 of 2 connection creation phases
51 * Added 26x26 and 64x64 variants of icons to hopefully fix issues on Maemo 4.1
54 * Canceling of outbound calls
55 * Bugfix: Removing race condition with disconnect. I introduced it expecting it to help but it hurts more than it helps
58 * Basic avatar support to distinguish phone types
59 * Tweaks to hopefully improve behavior
62 * Bugfix: Polling state machines weren't properly resetting (maybe thats why I had such good battery life)
63 * Bugfix: On Maemo 4.1 there are still some empty windows created
64 * Bugfix: Obscure alias bug no one should hit with The One Ring
65 * Bugfix: Another obscure bug causing possibly no negative side-effects
68 * Bugfix: Cancelling timeouts
71 * Bugfix: In 0.7.11 I messed up refreshing messages
72 * Bugfix: DND support has been broken for a while
73 * Bugfix: Auto-disconnect on Maemo 4.1 couldn't have worked for a while
74 * Bugfix: Handling missed calls had .. issues
75 * Bugfix: Issues when making a call introduced in 0.7.11
76 * Etc with the bug fixes (all too small to list)
79 * Bugfix: Attempting to improve the behavior of calls by reducing potential RTComm errors
80 * Bugfix: Issues with weird unexpected disconnect issues
81 * Bugfix: I guess I made a mistake in registering for system signals, whoops
82 * Bugfix: Following more closely the Telepathy spec by doing connects and disconnects asynchronously
85 * Increased the network timeout when connecting to GV
86 * Bugfix: On connection failure, the connection would be left around, preventing future connections
89 * Bugfix: Disconnect/Reconnect issues seem to be lessoned for me (What I previously thought was a bugfix turned out to cause several bugs.)
92 * Bugfix: Issues with checking for new conversations
95 * On change between available/away, start state_machine at max rather than min, reducing overhead
96 * Added a check for voicemails on missed/rejected calls (checks 3 times, 1 minute apart each)
97 * Adjusted default polling times to be more battery cautious for our n8x0 friends who can't change things right now
98 * Bugfix: Some of the derived polling settings had bugs
99 * Bugfix: Setting text polling to infinite would still have polling done if one sent a text
102 * On login, polling now starts at the max time rather than the min, reducing overhead
103 * Bugfix: Polling configuration wasn't actually hooked up to anything
104 * Debug Prompt: Made it so you can either reset one or all state machines (Rather than just all)
107 * Fixing a polling time bug introduced when making polling configurable
110 * Fixing a bug with deny-lists
113 * Fixing bug with being able to configure polling times
117 * Added option to make GV Contacts optional
118 * Added a limit, where if a state machine period is longer than it, than we set the period to infinite
119 * Delayed when we say the connection is disconnected to hopefully help random issues
120 * Tweaked how The One Ring shows up in the addressbook (Maemo 5)
121 * Made polling configurable
122 * Delayed auto-disconnect in case the user is just switching network connections (Maemo 4.1)
123 * Bugfix: Removed superfluous blank message from debug prompt
124 * Bugfix: Moved some more (very minor, very rarely used) timeouts to second resolution reducing overhead
125 * Bugfix: debug prompt commands handled command validation poorly
126 * Debug Prompt: Added a "version" command
127 * Debug Prompt: Added a "get_polling" command to find out what the actual polling periods are
128 * Debug Prompt: Added a "grab_log" command which is a broken but means to offer the log file through a file transfer
129 * Debug Prompt: Added a "save_log" command to help till grab_log works and for where file transfers aren't supported by clients
132 * Reducing the race window where GV will mark messages as read accidently
133 * Modified some things blindly "because thats what Butterfly does"
134 * Modified some support files to mimic other plugins on Maemo 5 PR1.1
135 * Added link to bug tracker and moved all bugs and enhancements to it
136 * Switched contacts to being away by default upon user feedback
137 * Adjusting handling of call states to at least allow the option of clients to provide clearer information to the user
138 * Fixing some bugs with handling a variety of phone number formats
139 * Removed a hack that changed the number being called, most likely put in place in a bygone era
142 * Initial beta release for Maemo 5
143 * Late Alpha for Maemo 4.1 with horrible consequences like crashing RTComm
146 * Pre-Alpha Development Release
150 __postinstall__ = """#!/bin/sh -e
152 gtk-update-icon-cache -f /usr/share/icons/hicolor
153 rm -f ~/.telepathy-theonering/theonering.log
156 def find_files(path):
157 for root, dirs, files in os.walk(path):
159 if file.startswith("src!"):
160 fileParts = file.split("!")
161 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
162 assert unused == "src"
163 relPath = os.sep.join(relPathParts)
164 yield relPath, file, newName
167 def unflatten_files(files):
169 for relPath, oldName, newName in files:
172 d[relPath].append((oldName, newName))
176 def build_package(distribution):
178 os.chdir(os.path.dirname(sys.argv[0]))
182 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
183 p = py2deb.Py2deb(__appname__)
184 if distribution == "debian":
185 p.prettyName = constants.__pretty_app_name__
187 p.prettyName = "Google Voice plugin for Conversations and Calls"
188 p.description = __description__
189 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=The%%20One%%20Ring"
190 #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
191 p.author = __author__
196 "diablo": "user/network",
197 "fremantle": "user/network",
199 p.depends = ", ".join([
200 "python (>= 2.5) | python2.5",
201 "python-dbus | python2.5-dbus",
202 "python-gobject | python2.5-gobject",
203 "python-telepathy | python2.5-telepathy",
207 "diablo": ", python2.5-conic, account-plugin-haze",
208 "fremantle": ", account-plugin-haze",
212 p.distribution = "diablo fremantle debian"
213 p.repository = "extras"
214 p.changelog = __changelog__
215 p.postinstall = __postinstall__
216 p.icon = "32-tor_handset.png"
217 for relPath, files in unflatten_files(find_files(".")).iteritems():
218 fullPath = "/usr/lib/theonering"
220 fullPath += os.sep+relPath
222 "|".join((oldName, newName))
223 for (oldName, newName) in files
225 p["/usr/share/dbus-1/services"] = ["org.freedesktop.Telepathy.ConnectionManager.theonering.service"]
226 if distribution in ("debian", ):
227 p["/usr/share/mission-control/profiles"] = ["theonering.profile.%s|theonering.profile"% distribution]
228 elif distribution in ("diablo", "fremantle"):
229 p["/usr/share/osso-rtcom"] = ["theonering.profile.%s|theonering.profile"% distribution]
230 p["/usr/lib/telepathy"] = ["telepathy-theonering"]
231 p["/usr/share/telepathy/managers"] = ["theonering.manager"]
232 if distribution in ("debian", ):
233 iconBasePath = "/usr/share/icons/gnome/%s/apps"
234 elif distribution in ("diablo", "fremantle"):
235 iconBasePath = "/usr/share/icons/hicolor/%s/hildon"
236 p[iconBasePath % "26x26"] = ["26-tor_handset.png|im-theonering.png"]
237 p[iconBasePath % "32x32"] = ["32-tor_handset.png|im-theonering.png"]
238 p[iconBasePath % "64x64"] = ["64-tor_handset.png|im-theonering.png"]
239 p["/usr/share/theonering"] = [
240 "32-tor_handset.png|tor_handset.png",
241 "32-tor_phone.png|tor_phone.png",
242 "32-tor_question.png|tor_question.png",
243 "32-tor_self.png|tor_self.png",
246 if distribution == "debian":
249 version="%s-%s" % (__version__, __build__),
250 changelog=__changelog__,
256 print "Building for %s finished" % distribution
260 version="%s-%s" % (__version__, __build__),
261 changelog=__changelog__,
267 print "Building for %s finished" % distribution
270 if __name__ == "__main__":
271 if len(sys.argv) > 1:
277 if optparse is not None:
278 parser = optparse.OptionParser()
279 (commandOptions, commandArgs) = parser.parse_args()
282 commandArgs = ["diablo"]
283 build_package(commandArgs[0])