# Description: A message bus system
# URL: https://freedesktop.org/wiki/Software/dbus
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: expat

name=dbus
version=1.14.10
release=1
source=(https://dbus.freedesktop.org/releases/dbus/$name-$version.tar.xz
	rc.dbus 30-dbus.launch)

build() {
	cd $name-$version

	./configure \
		--prefix=/usr \
		--with-dbus-daemondir=/usr/sbin \
		--localstatedir=/var \
		--runstatedir=/run \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/dbus \
		--with-dbus-user=messagebus \
		--with-init-scripts=none \
		--with-system-pid-file=/run/dbus/pid \
		--with-system-socket=/run/dbus/system_bus_socket

	make
	make DESTDIR=$PKG install

	install -D -m 0755 $SRC/rc.dbus $PKG/etc/rc.d/dbus
	install -D -m 0755 $SRC/30-dbus.launch \
		$PKG/etc/X11/xinit/xinitrc.d/30-dbus.launch.sh

	rm -r $PKG/usr/share/doc $PKG/var/run
	rm -rf $PKG/usr/share/xml
}
