2 # -*- coding: utf-8 -*-
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published
5 ## by the Free Software Foundation; version 2 only.
7 ## This program is distributed in the hope that it will be useful,
8 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
9 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 ## GNU General Public License for more details.
15 if __name__ == "__main__":
17 os.chdir(os.path.dirname(sys.argv[0]))
22 p=py2deb.Py2deb("ussd-widget")
23 p.description="Widget, that executes USSD query and displays response text\nThe main purpose is viewing your balance. In Russia all operators provide balace information via USSD queries and most part of contracts are prepaid. Ability to see your balance on desktop can be useful in such case.\nAnyway, you can configure widget to any other USSD query."
24 p.author="Alexey Guseynov"
25 p.mail="kibergus@gmail.com"
26 p.depends = "python2.5, ussd4all (>=0.0.0), python-hildondesktop (>=0.1.0-1maemo2), hildon-desktop-python-loader (>=0.1.0-1maemo2), python-gtk2, python-gobject, python-hildon, python-cairo, python-dbus"
27 p.section="user/desktop"
28 p.icon = "./ussd-widget.png"
29 p.arch="all" #should be all for python, any for all arch
30 p.urgency="low" #not used in maemo onl for deb os
31 p.distribution="fremantle"
32 p.repository="extras-devel"
33 p.xsbc_bugtracker="https://garage.maemo.org/tracker/?group_id=1219"
34 p.postinstall="""#!/bin/sh
35 touch /var/log/ussd-widget.log
36 chmod 666 /var/log/ussd-widget.log
39 rm /var/log/ussd-widget.log
43 changeloginformation = "Writable log. Create log file on installation."
47 #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list
48 for root, dirs, files in os.walk(dir_name):
49 real_dir = root[len(dir_name):]
52 if f.find(".svn") < 0 and root.find(".svn") < 0:
53 fake_file.append(root + os.sep + f + "|" + f);
54 if len(fake_file) > 0:
55 p[real_dir] = fake_file
58 r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
59 fake_file.append(root + os.sep + f + "|" + f)
60 # if len(fake_file) > 0:
61 # p[real_dir] = fake_file