# $Id$ PNAME="dbus" PVER="1.6.14" PBUILD="r2" PCAT="sys-apps" DESCRIPTION="D-BUS is a message bus system, a simple way for applications to talk to one another." HOMEPAGE="http://www.freedesktop.org/Software/dbus" DEPEND=">= x11-libs/libX11-1.4 >= x11-libs/libXt-1.1 >= dev-libs/expat-2 >= sys-apps/util-linux-2.20" SDEPEND=">= dev-util/pkgconfig-0.25" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools multilib systemd SESSION_SCRIPT_REV=2 SRC_URI=( http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-1.5.8-no-fatal-warnings.patch mirror://${PNAME}/30-dbus-${SESSION_SCRIPT_REV} ) # use subdir $uri/dbus UP2SUBDIR="${PNAME}" UP2DATE="updatecmd_freedesktop ${PNAME} gz" src_prepare() { munpack ${SRCFILE} || die # do not abort on fatal warnings by default mpatch ${PNAME}-1.5.8-no-fatal-warnings.patch || die # fix missing include all-abis 'sed -i "s/#include /#include \n#include /g" dbus/dbus-sysdeps-util-unix.c' || die } src_compile() { # using /lib/systemd/system as systemd units dir even on multilib systems # to have one common rules/script directory! mconfigure \ --with-system-pid-file=/run/dbus.pid \ --with-system-socket=/run/dbus/system_bus_socket \ --with-session-socket-dir=/tmp \ --with-test-socket-dir=/tmp \ --libexecdir=/usr/$(mlibdir)/dbus-1.0 \ --localstatedir=/var \ --with-dbus-user=messagebus \ --with-xml=expat \ --disable-verbose-mode \ --disable-checks \ --disable-asserts \ --enable-inotify \ --with-x \ --disable-doxygen-docs \ --disable-xml-docs \ --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \ || die mmake || die } src_install() { # fix ln issue on multilib: force overwrite of all symlinks mmake install DESTDIR=${BINDIR} LN_S="'ln -sf'" || die # install session script minstalldir /etc/X11/xinit/xinitrc.d || die minstallexec -s 30-dbus-${SESSION_SCRIPT_REV} /etc/X11/xinit/xinitrc.d || die # mark some dirs undeletable mkeepdir /var/lib/dbus || die mkeepdir /run/dbus || die mkeepdir /usr/lib/dbus-1.0/services || die mkeepdir /usr/share/dbus-1/services || die mkeepdir /etc/dbus-1/system.d || die mkeepdir /etc/dbus-1/session.d || die minstalldocs AUTHORS ChangeLog COPYING HACKING NEWS README || die } preinstall() { # adds plugdev group ${MLIBDIR}/mgroupadd -o "-g 302" plugdev # adds messagebus user ${MLIBDIR}/mgroupadd -o "-g 300" messagebus ${MLIBDIR}/museradd -o "-M -u 300 -g messagebus -d /dev/null -s /bin/false" messagebus } postinstall() { # only reload dbus-daemon if already running if pidof dbus-daemon > /dev/null then mreloadunit dbus.service dbus-daemon else mstartunit dbus.service dbus-daemon fi } postremove() { mstopunit dbus.service dbus-daemon }