Update python binding
[empathy.git] / python / update-binding.sh
1 #! /bin/sh
2 #Manually update headers in pyempathy.override and pyempathygtk.override.
3
4 # Update the list of headers from Makefile.am
5 cd ../libempathy
6 python /usr/share/pygobject/2.0/codegen/h2def.py        \
7         -m empathy                              \
8         empathy-account-manager.h               \
9         empathy-chatroom.h                      \
10         empathy-chatroom-manager.h              \
11         empathy-contact.h                       \
12         empathy-contact-factory.h               \
13         empathy-contact-groups.h                \
14         empathy-contact-list.h                  \
15         empathy-contact-manager.h               \
16         empathy-contact-monitor.h               \
17         empathy-debug.h                         \
18         empathy-dispatcher.h                    \
19         empathy-dispatch-operation.h            \
20         empathy-idle.h                          \
21         empathy-irc-network.h                   \
22         empathy-irc-network-manager.h           \
23         empathy-irc-server.h                    \
24         empathy-log-manager.h                   \
25         empathy-message.h                       \
26         empathy-status-presets.h                \
27         empathy-time.h                          \
28         empathy-tp-call.h                       \
29         empathy-tp-chat.h                       \
30         empathy-tp-contact-factory.h            \
31         empathy-tp-contact-list.h               \
32         empathy-tp-file.h                       \
33         empathy-tp-group.h                      \
34         empathy-tp-roomlist.h                   \
35         empathy-tp-tube.h                       \
36         empathy-tube-handler.h                  \
37         empathy-types.h                         \
38         empathy-utils.h                         \
39  > ../python/pyempathy/pyempathy.defs
40
41 # Update the list of headers from Makefile.am
42 cd ../libempathy-gtk
43 python /usr/share/pygobject/2.0/codegen/h2def.py        \
44         -m empathy                              \
45         empathy-account-chooser.h               \
46         empathy-account-widget.h                \
47         empathy-account-widget-irc.h            \
48         empathy-account-widget-sip.h            \
49         empathy-avatar-chooser.h                \
50         empathy-avatar-image.h                  \
51         empathy-cell-renderer-activatable.h     \
52         empathy-cell-renderer-expander.h        \
53         empathy-cell-renderer-text.h            \
54         empathy-chat.h                          \
55         empathy-chat-text-view.h                \
56         empathy-chat-view.h                     \
57         empathy-conf.h                          \
58         empathy-contact-dialogs.h               \
59         empathy-contact-list-store.h            \
60         empathy-contact-list-view.h             \
61         empathy-contact-menu.h                  \
62         empathy-contact-selector.h              \
63         empathy-contact-widget.h                \
64         empathy-geometry.h                      \
65         empathy-images.h                        \
66         empathy-irc-network-dialog.h            \
67         empathy-log-window.h                    \
68         empathy-new-message-dialog.h            \
69         empathy-presence-chooser.h              \
70         empathy-profile-chooser.h               \
71         empathy-smiley-manager.h                \
72         empathy-spell.h                         \
73         empathy-spell-dialog.h                  \
74         empathy-theme-boxes.h                   \
75         empathy-theme-irc.h                     \
76         empathy-theme-manager.h                 \
77         empathy-ui-utils.h                      \
78  > ../python/pyempathygtk/pyempathygtk.defs
79
80 # Keep original version
81 cd ../python
82 cp pyempathy/pyempathy.defs /tmp
83 cp pyempathygtk/pyempathygtk.defs /tmp
84
85 # Apply patches
86 patch -p0 < pyempathy.patch
87 patch -p0 < pyempathygtk.patch
88
89 # Fix define of interfaces, they are not objects
90 sed -e 's/define-object \(ChatView$\)/define-interface \1/' \
91     -i pyempathygtk/pyempathygtk.defs
92 sed -e 's/define-object \(ContactList$\)/define-interface \1/' \
93     -i pyempathy/pyempathy.defs
94
95 # Make modification then run that:
96 #diff -up /tmp/pyempathy.defs pyempathy/pyempathy.defs > pyempathy.patch
97 #diff -up /tmp/pyempathygtk.defs pyempathygtk/pyempathygtk.defs > pyempathygtk.patch
98