~ubuntu-branches/ubuntu/precise/empathy/precise-proposed-201205180810

« back to all changes in this revision

Viewing changes to telepathy-yell/tools/with-session-bus.sh

  • Committer: Bazaar Package Importer
  • Author(s): Brian Curtis, Brian Curtis, Ken VanDine
  • Date: 2011-06-01 10:35:24 UTC
  • mfrom: (1.1.70 upstream) (6.3.44 experimental)
  • Revision ID: james.westby@ubuntu.com-20110601103524-wx3wgp71394730jt
Tags: 3.1.1-1ubuntu1
[ Brian Curtis ]
* Merge with Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Drop geoclue/mapping build-depends (they are in Universe)
  - Add Vcz-Bzr link
  - Add Suggests on telepathy-idle
  - Bump telepathy-butterfly, telepathy-haze to recommends
  - Don't recommend the freedesktop sound theme we have an ubuntu one
  - Add build depend for libunity-dev
* debian/rules:
  - Use autoreconf.mk
  - Disable map and location
* debian/empathy.install:
  - Install message indicator configuration
* debian/indicators/empathy:
  - Message indicator configuration
* debian/patches/01_lpi.patch:
  - Add Launchpad integration
* debian/patches/10_use_notify_osd_icons.patch:
  - Use the notify-osd image for new messages
* debian/patches/34_start_raised_execpt_in_session.patch
  - If not started with the session, we should always raise
* debian/patches/36_chat_window_default_size.patch:
  - Make the default chat window size larger
* debian/patches/37_facebook_default.patch:
  - Make facebook the default chat account type
* debian/patches/38_lp_569289.patch
  - Set freenode as default IRC network for new IRC accounts 
* debian/patches/41_unity_launcher_progress.patch
  - Display file transfer progress in the unity launcher

[ Ken VanDine ]
* debian/control
  - build depend on libgcr-3-dev instead of libgcr-dev
  - dropped build depends for libindicate, we will use telepathy-indicator
  - Depend on dconf-gsettings-backend | gsettings-backend
  - Added a Recommends for telepathy-indicator
* +debian/empathy.gsettings-override
  - Added an override for notifications-focus
* debian/patches/series
  - commented out 23_idomessagedialog_for_voip_and_ft.patch, until ido has 
    been ported to gtk3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# with-session-bus.sh - run a program with a temporary D-Bus session daemon
3
 
#
4
 
# The canonical location of this program is the telepathy-glib tools/
5
 
# directory, please synchronize any changes with that copy.
6
 
#
7
 
# Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
8
 
#
9
 
# Copying and distribution of this file, with or without modification,
10
 
# are permitted in any medium without royalty provided the copyright
11
 
# notice and this notice are preserved.
12
 
 
13
 
set -e
14
 
 
15
 
me=with-session-bus
16
 
 
17
 
dbus_daemon_args="--print-address=5 --print-pid=6 --fork"
18
 
sleep=0
19
 
 
20
 
usage ()
21
 
{
22
 
  echo "usage: $me [options] -- program [program_options]" >&2
23
 
  echo "Requires write access to the current directory." >&2
24
 
  echo "" >&2
25
 
  echo "If \$WITH_SESSION_BUS_FORK_DBUS_MONITOR is set, fork dbus-monitor" >&2
26
 
  echo "with the arguments in \$WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT." >&2
27
 
  echo "The output of dbus-monitor is saved in $me-<pid>.dbus-monitor-logs" >&2
28
 
  exit 2
29
 
}
30
 
 
31
 
while test "z$1" != "z--"; do
32
 
  case "$1" in
33
 
  --sleep=*)
34
 
    sleep="$1"
35
 
    sleep="${sleep#--sleep=}"
36
 
    shift
37
 
    ;;
38
 
  --session)
39
 
    dbus_daemon_args="$dbus_daemon_args --session"
40
 
    shift
41
 
    ;;
42
 
  --config-file=*)
43
 
    # FIXME: assumes config file doesn't contain any special characters
44
 
    dbus_daemon_args="$dbus_daemon_args $1"
45
 
    shift
46
 
    ;;
47
 
  *)
48
 
    usage
49
 
    ;;
50
 
  esac
51
 
done
52
 
shift
53
 
if test "z$1" = "z"; then usage; fi
54
 
 
55
 
exec 5> $me-$$.address
56
 
exec 6> $me-$$.pid
57
 
 
58
 
cleanup ()
59
 
{
60
 
  pid=`head -n1 $me-$$.pid`
61
 
  if test -n "$pid" ; then
62
 
    echo "Killing temporary bus daemon: $pid" >&2
63
 
    kill -INT "$pid"
64
 
  fi
65
 
  rm -f $me-$$.address
66
 
  rm -f $me-$$.pid
67
 
}
68
 
 
69
 
trap cleanup INT HUP TERM
70
 
dbus-daemon $dbus_daemon_args
71
 
 
72
 
{ echo -n "Temporary bus daemon is "; cat $me-$$.address; } >&2
73
 
{ echo -n "Temporary bus daemon PID is "; head -n1 $me-$$.pid; } >&2
74
 
 
75
 
e=0
76
 
DBUS_SESSION_BUS_ADDRESS="`cat $me-$$.address`"
77
 
export DBUS_SESSION_BUS_ADDRESS
78
 
 
79
 
if [ -n "$WITH_SESSION_BUS_FORK_DBUS_MONITOR" ] ; then
80
 
  echo -n "Forking dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT" >&2
81
 
  dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT \
82
 
        > $me-$$.dbus-monitor-logs 2>&1 &
83
 
fi
84
 
 
85
 
"$@" || e=$?
86
 
 
87
 
if test $sleep != 0; then
88
 
  sleep $sleep
89
 
fi
90
 
 
91
 
trap - INT HUP TERM
92
 
cleanup
93
 
 
94
 
exit $e