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 * Bugfix: Cancelling timeouts
41 * Bugfix: In 0.7.11 I messed up refreshing messages
42 * Bugfix: DND support has been broken for a while
43 * Bugfix: Auto-disconnect on Maemo 4.1 couldn't have worked for a while
44 * Bugfix: Handling missed calls had .. issues
45 * Bugfix: Issues when making a call introduced in 0.7.11
46 * Etc with the bug fixes (all too small to list)
49 * Bugfix: Attempting to improve the behavior of calls by reducing potential RTComm errors
50 * Bugfix: Issues with weird unexpected disconnect issues
51 * Bugfix: I guess I made a mistake in registering for system signals, whoops
52 * Bugfix: Following more closely the Telepathy spec by doing connects and disconnects asynchronously
55 * Increased the network timeout when connecting to GV
56 * Bugfix: On connection failure, the connection would be left around, preventing future connections
59 * Bugfix: Disconnect/Reconnect issues seem to be lessoned for me (What I previously thought was a bugfix turned out to cause several bugs.)
62 * Bugfix: Issues with checking for new conversations
65 * On change between available/away, start state_machine at max rather than min, reducing overhead
66 * Added a check for voicemails on missed/rejected calls (checks 3 times, 1 minute apart each)
67 * Adjusted default polling times to be more battery cautious for our n8x0 friends who can't change things right now
68 * Bugfix: Some of the derived polling settings had bugs
69 * Bugfix: Setting text polling to infinite would still have polling done if one sent a text
72 * On login, polling now starts at the max time rather than the min, reducing overhead
73 * Bugfix: Polling configuration wasn't actually hooked up to anything
74 * Debug Prompt: Made it so you can either reset one or all state machines (Rather than just all)
77 * Fixing a polling time bug introduced when making polling configurable
80 * Fixing a bug with deny-lists
83 * Fixing bug with being able to configure polling times
87 * Added option to make GV Contacts optional
88 * Added a limit, where if a state machine period is longer than it, than we set the period to infinite
89 * Delayed when we say the connection is disconnected to hopefully help random issues
90 * Tweaked how The One Ring shows up in the addressbook (Maemo 5)
91 * Made polling configurable
92 * Delayed auto-disconnect in case the user is just switching network connections (Maemo 4.1)
93 * Bugfix: Removed superfluous blank message from debug prompt
94 * Bugfix: Moved some more (very minor, very rarely used) timeouts to second resolution reducing overhead
95 * Bugfix: debug prompt commands handled command validation poorly
96 * Debug Prompt: Added a "version" command
97 * Debug Prompt: Added a "get_polling" command to find out what the actual polling periods are
98 * Debug Prompt: Added a "grab_log" command which is a broken but means to offer the log file through a file transfer
99 * Debug Prompt: Added a "save_log" command to help till grab_log works and for where file transfers aren't supported by clients
102 * Reducing the race window where GV will mark messages as read accidently
103 * Modified some things blindly "because thats what Butterfly does"
104 * Modified some support files to mimic other plugins on Maemo 5 PR1.1
105 * Added link to bug tracker and moved all bugs and enhancements to it
106 * Switched contacts to being away by default upon user feedback
107 * Adjusting handling of call states to at least allow the option of clients to provide clearer information to the user
108 * Fixing some bugs with handling a variety of phone number formats
109 * Removed a hack that changed the number being called, most likely put in place in a bygone era
112 * Initial beta release for Maemo 5
113 * Late Alpha for Maemo 4.1 with horrible consequences like crashing RTComm
116 * Pre-Alpha Development Release
120 __postinstall__ = """#!/bin/sh -e
122 gtk-update-icon-cache -f /usr/share/icons/hicolor
123 rm -f ~/.telepathy-theonering/theonering.log
126 def find_files(path):
127 for root, dirs, files in os.walk(path):
129 if file.startswith("src!"):
130 fileParts = file.split("!")
131 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
132 assert unused == "src"
133 relPath = os.sep.join(relPathParts)
134 yield relPath, file, newName
137 def unflatten_files(files):
139 for relPath, oldName, newName in files:
142 d[relPath].append((oldName, newName))
146 def build_package(distribution):
148 os.chdir(os.path.dirname(sys.argv[0]))
152 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
153 p = py2deb.Py2deb(__appname__)
154 if distribution == "debian":
155 p.prettyName = constants.__pretty_app_name__
157 p.prettyName = "Google Voice plugin for Conversations and Calls"
158 p.description = __description__
159 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=The%%20One%%20Ring"
160 #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
161 p.author = __author__
166 "diablo": "user/network",
167 "fremantle": "user/network",
168 "mer": "user/network",
170 p.depends = ", ".join([
171 "python (>= 2.5) | python2.5",
172 "python-dbus | python2.5-dbus",
173 "python-gobject | python2.5-gobject",
174 "python-telepathy | python2.5-telepathy",
178 "diablo": ", python2.5-conic, account-plugin-haze",
179 "fremantle": ", account-plugin-haze",
184 p.distribution = "diablo fremantle mer debian"
185 p.repository = "extras"
186 p.changelog = __changelog__
187 p.postinstall = __postinstall__
189 "debian": "26x26-theonering.png",
190 "diablo": "26x26-theonering.png",
191 "fremantle": "64x64-theonering.png", # Fremantle natively uses 48x48
192 "mer": "64x64-theonering.png",
194 for relPath, files in unflatten_files(find_files(".")).iteritems():
195 fullPath = "/usr/lib/theonering"
197 fullPath += os.sep+relPath
199 "|".join((oldName, newName))
200 for (oldName, newName) in files
202 p["/usr/share/dbus-1/services"] = ["org.freedesktop.Telepathy.ConnectionManager.theonering.service"]
203 if distribution in ("debian", ):
204 p["/usr/share/mission-control/profiles"] = ["theonering.profile.%s|theonering.profile"% distribution]
205 elif distribution in ("diablo", "fremantle", "mer"):
206 p["/usr/share/osso-rtcom"] = ["theonering.profile.%s|theonering.profile"% distribution]
207 p["/usr/lib/telepathy"] = ["telepathy-theonering"]
208 p["/usr/share/telepathy/managers"] = ["theonering.manager"]
209 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-theonering.png|im-theonering.png"]
211 if distribution == "debian":
214 version="%s-%s" % (__version__, __build__),
215 changelog=__changelog__,
221 print "Building for %s finished" % distribution
225 version="%s-%s" % (__version__, __build__),
226 changelog=__changelog__,
232 print "Building for %s finished" % distribution
235 if __name__ == "__main__":
236 if len(sys.argv) > 1:
242 if optparse is not None:
243 parser = optparse.OptionParser()
244 (commandOptions, commandArgs) = parser.parse_args()
247 commandArgs = ["diablo"]
248 build_package(commandArgs[0])