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