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]))
21 p=pypackager.PyPackager("profile-appointments")
24 p.display_name='profile-appointments'
25 p.description="widget to switch profile to silent when a meeting is in progress , and switch back to general afterward"
27 p.maintainer="Niv Waizer"
28 p.email="nivwiz@gmail.com"
29 p.depends = "python-hildon (>= 0.9.0-1maemo15), python-hildondesktop (>= 0.1.0-1maemo3), python-gtk2 (>= 2.12.1-6maemo10), python-gobject (>= 2.16), hildon-desktop-python-loader (>= 0.1.0-1maemo3), python-dbus, sudo, python, python-support (>= 0.90.0), python2.5, python-dbus, python-mafw"
30 p.section="user/development"
33 p.bugtracker='http://unknown'
34 p.distribution="fremantle"
35 p.repository="extras-devel"
36 p.icon='profile-appointments.png'
37 p["/etc/init.d"] = ["switch_backend",]
38 p["/usr/lib/hildon-desktop"] = ["profile-appointments.py",]
39 p["/usr/lib/switchProfByMeeting"] = ["debug.py", "switch_backend.py",]
40 p["/usr/share/icons/hicolor/32x32/hildon"] = ["profile-appointments.png",]
41 p["/etc/sudoers.d"] = ["profile-appointments.sudoers",]
42 p["/usr/share/applications/hildon-status-menu"] = ["profile-appointments.desktop",]
44 p.postinstall = """#!/bin/sh
45 update-sudoers || true
47 gtk-update-icon-cache /usr/share/icons/hicolor/
49 #chmod 755".join(p['/usr/...']
50 for file in /etc/init.d/switch_backend /usr/lib/switchProfByMeeting/switch_backend.py ; do
53 for file in /usr/share/applications/hildon-status-menu/profile-appointments.desktop /usr/lib/hildon-desktop/profile-appointments.py ; do
57 #Force applet reloading to get the icon
58 echo "Reloading switchByProfile"
59 TMPFILE=`mktemp /tmp/temp.XXXXXX`
60 mv /usr/share/applications/hildon-status-menu/profile-appointments.desktop $TMPFILE
62 mv $TMPFILE /usr/share/applications/hildon-status-menu/profile-appointments.desktop
65 # Automatically added by dh_pysupport
66 #if which update-python-modules >/dev/null 2>&1; then
67 # update-python-modules openvpn-applet.private
72 p.changelog="""First Release
75 print p.generate(build_binary=True,build_src=True)