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 * Fixing a polling time bug introduced when making polling configurable
41 * Fixing a bug with deny-lists
44 * Fixing bug with being able to configure polling times
48 * Added option to make GV Contacts optional
49 * Added a limit, where if a state machine period is longer than it, than we set the period to infinite
50 * Delayed when we say the connection is disconnected to hopefully help random issues
51 * Tweaked how The One Ring shows up in the addressbook (Maemo 5)
52 * Made polling configurable
53 * Delayed auto-disconnect in case the user is just switching network connections (Maemo 4.1)
54 * Bugfix: Removed superfluous blank message from debug prompt
55 * Bugfix: Moved some more (very minor, very rarely used) timeouts to second resolution reducing overhead
56 * Bugfix: debug prompt commands handled command validation poorly
57 * Debug Prompt: Added a "version" command
58 * Debug Prompt: Added a "get_polling" command to find out what the actual polling periods are
59 * Debug Prompt: Added a "grab_log" command which is a broken but means to offer the log file through a file transfer
60 * Debug Prompt: Added a "save_log" command to help till grab_log works and for where file transfers aren't supported by clients
63 * Reducing the race window where GV will mark messages as read accidently
64 * Modified some things blindly "because thats what Butterfly does"
65 * Modified some support files to mimic other plugins on Maemo 5 PR1.1
66 * Added link to bug tracker and moved all bugs and enhancements to it
67 * Switched contacts to being away by default upon user feedback
68 * Adjusting handling of call states to at least allow the option of clients to provide clearer information to the user
69 * Fixing some bugs with handling a variety of phone number formats
70 * Removed a hack that changed the number being called, most likely put in place in a bygone era
73 * Initial beta release for Maemo 5
74 * Late Alpha for Maemo 4.1 with horrible consequences like crashing RTComm
77 * Pre-Alpha Development Release
81 __postinstall__ = """#!/bin/sh -e
83 gtk-update-icon-cache -f /usr/share/icons/hicolor
84 rm -f ~/.telepathy-theonering/theonering.log
88 for root, dirs, files in os.walk(path):
90 if file.startswith("src!"):
91 fileParts = file.split("!")
92 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
93 assert unused == "src"
94 relPath = os.sep.join(relPathParts)
95 yield relPath, file, newName
98 def unflatten_files(files):
100 for relPath, oldName, newName in files:
103 d[relPath].append((oldName, newName))
107 def build_package(distribution):
109 os.chdir(os.path.dirname(sys.argv[0]))
113 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
114 p = py2deb.Py2deb(__appname__)
115 if distribution == "debian":
116 p.prettyName = constants.__pretty_app_name__
118 p.prettyName = "Google Voice plugin for Conversations and Calls"
119 p.description = __description__
120 p.bugTracker = "https://bugs.maemo.org/enter_bug.cgi?product=The%%20One%%20Ring"
121 #p.upgradeDescription = __changelog__.split("\n\n", 1)[0]
122 p.author = __author__
127 "diablo": "user/network",
128 "fremantle": "user/network",
129 "mer": "user/network",
131 p.depends = ", ".join([
132 "python (>= 2.5) | python2.5",
133 "python-dbus | python2.5-dbus",
134 "python-gobject | python2.5-gobject",
135 "python-telepathy | python2.5-telepathy",
139 "diablo": ", python2.5-conic, account-plugin-haze",
140 "fremantle": ", account-plugin-haze",
145 p.distribution = "diablo fremantle mer debian"
146 p.repository = "extras"
147 p.changelog = __changelog__
148 p.postinstall = __postinstall__
150 "debian": "26x26-theonering.png",
151 "diablo": "26x26-theonering.png",
152 "fremantle": "64x64-theonering.png", # Fremantle natively uses 48x48
153 "mer": "64x64-theonering.png",
155 for relPath, files in unflatten_files(find_files(".")).iteritems():
156 fullPath = "/usr/lib/theonering"
158 fullPath += os.sep+relPath
160 "|".join((oldName, newName))
161 for (oldName, newName) in files
163 p["/usr/share/dbus-1/services"] = ["org.freedesktop.Telepathy.ConnectionManager.theonering.service"]
164 if distribution in ("debian", ):
165 p["/usr/share/mission-control/profiles"] = ["theonering.profile.%s|theonering.profile"% distribution]
166 elif distribution in ("diablo", "fremantle", "mer"):
167 p["/usr/share/osso-rtcom"] = ["theonering.profile.%s|theonering.profile"% distribution]
168 p["/usr/lib/telepathy"] = ["telepathy-theonering"]
169 p["/usr/share/telepathy/managers"] = ["theonering.manager"]
170 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-theonering.png|im-theonering.png"]
172 if distribution == "debian":
175 version="%s-%s" % (__version__, __build__),
176 changelog=__changelog__,
182 print "Building for %s finished" % distribution
186 version="%s-%s" % (__version__, __build__),
187 changelog=__changelog__,
193 print "Building for %s finished" % distribution
196 if __name__ == "__main__":
197 if len(sys.argv) > 1:
203 if optparse is not None:
204 parser = optparse.OptionParser()
205 (commandOptions, commandArgs) = parser.parse_args()
208 commandArgs = ["diablo"]
209 build_package(commandArgs[0])