# $Id$ PNAME="dbus" PVER="1.3.0" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" 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 >= x11-libs/libXt-1 >= dev-libs/expat-2" SDEPEND=">= dev-util/pkgconfig-0.23" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools multilib RC_CVS_REV=1.2 SRC_URI=( http://dbus.freedesktop.org/releases/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/dbus.rc-1.0-${RC_CVS_REV} mirror://${PNAME}/30-dbus ) # use subdir $uri/dbus UP2SUBDIR="${PNAME}" UP2DATE="updatecmd_freedesktop ${PNAME} gz" src_prepare() { munpack ${SRCFILE} || die # fix missing include all-abis 'sed -i "s/#include /#include \n#include /g" dbus/dbus-sysdeps-util-unix.c' || die } src_compile() { mconfigure \ --with-system-pid-file=/var/run/dbus.pid \ --with-system-socket=/var/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-dnotify \ --with-x \ --disable-doxygen-docs \ --disable-xml-docs \ || die mmake || die } src_install() { # needed directories minstalldir /etc/X11/xinit/xinitrc.d || die minstalldir /usr/env || die minstall_destdir || die # init script minstallrc dbus.rc-1.0-${RC_CVS_REV} dbus || die # session script minstallexec -s 30-dbus /etc/X11/xinit/xinitrc.d || die # kde needs special treatments minstallexec -s 30-dbus /usr/env/dbus-env.sh || die # mark some dirs undeletable mkeepdir /var/lib/dbus || die mkeepdir /var/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 "-u 300 -g messagebus -d /dev/null -s /bin/false" messagebus } postinstall() { mstartservice dbus /usr/bin/dbus-daemon } postremove() { if [ ! -f ${MROOT}/usr/bin/dbus-daemon ] then mstopservice dbus /usr/bin/dbus-daemon fi }