Receipt for: dbus
source
stuff/etc/X11/xinit/xinitrc.d/30-dbus
stuff/etc/init.d/dbus
PACKAGE="dbus"
VERSION="1.12.20"
CATEGORY="x-window"
SHORT_DESC="A message bus system."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://www.freedesktop.org/wiki/Software/dbus/"
PROVIDE="dbus-wayland"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://dbus.freedesktop.org/releases/dbus/$TARBALL"
DEPENDS="expat slitaz-base-files util-linux-uuid xorg-libICE
xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp"
BUILD_DEPENDS="expat-dev util-linux-uuid-dev xorg-libX11-dev xorg-xproto"
HOST_ARCH="i486 arm x86_64"
current_version()
{
local branch=$(wget -O - $WEB_SITE 2>/dev/null | sed '/>stable</!d;s|.*dbus-||;s|/NEWS.*||')
wget -O - $(dirname $WGET_URL) 2>/dev/null | \
sed "/dbus-$branch/!d;s|.*dbus-||;s|.tar.*||" | sed '$!d'
}
compile_rules()
{
# Disable the modular test suite: it auto-pulls glib (libgobject) when
# glib is installed (cairo-wayland chain), which fails to link against
# the env's libffi (ffi_*@LIBFFI_BASE_8.0). dbus itself doesn't need glib.
./configure \
--libexecdir=/usr/lib/dbus \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-tests \
--disable-modular-tests \
--disable-installed-tests \
$CONFIGURE_ARGS &&
make &&
make install
}
genpkg_rules()
{
mkdir -p $fs/usr/lib
mkdir -p $fs/usr/share
cp -a $install/etc $fs
cp -a $install/var $fs
cp -a $install/usr/bin $fs/usr
cp -a $install/usr/lib/*.so* $fs/usr/lib
cp -a $install/usr/lib/dbus $fs/usr/lib
cp -a $install/usr/share/dbus* $fs/usr/share
# Init script
cp -a $stuff/etc $fs
# Remove helper --> dbus-helper
rm $fs/usr/lib/dbus/dbus-daemon-launch-helper
chown -R root:root $fs
}
pre_install()
{
# Go for echoing on configuration files if any messagebus user
# was found.
if ! grep -qs 'messagebus' "$1/etc/passwd"
then
action 'Adding user: messagebus...'
echo 'messagebus:x:25:25:DBUS Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
echo 'messagebus:!:14013:0:99999:7:::' >> "$1/etc/shadow"
echo 'messagebus:x:25:' >> "$1/etc/group"
echo 'messagebus:!::' >> "$1/etc/gshadow"
status
fi
if ! grep -qs ^DBUS_OPTIONS "$1/etc/daemons.conf"
then
action 'Configuring %s/etc/daemons.conf...' "$1"
cat >> "$1/etc/daemons.conf" << "EOT"
DBUS_OPTIONS="--system"
EOT
status
fi
[ -d "$1/var/run" ] || mkdir -p "$1/var/run"
}
pre_remove()
{
if [ -z "$1" ]
then
/etc/init.d/dbus stop 2> /dev/null
grep -qs 'messagebus' "$1/etc/passwd" &&
deluser messagebus
fi
}