# Exit on error:
set -e

wget http://dbus.freedesktop.org/releases/dbus/dbus-1.7.6.tar.gz
tar xf dbus-1.7.6.tar.gz
cd dbus-1.7.6

./configure \
    --prefix= \
    --libexecdir=/lib/dbus

make install
cd ..
rm -rf dbus-1.7.6
rm dbus-1.7.6.tar.gz

dbus-uuidgen --ensure

echo
echo Now run the following commands as root:
#echo chown root:messagebus /lib/dbus/dbus-daemon-launch-helper
echo chmod 4750 /lib/dbus/dbus-daemon-launch-helper

# Fix permissions for Package Users:
chmod g+w,o+t /share/dbus-1/services
chmod g+w,o+t /include/dbus-1.0/dbus

exit 0
