# Template file for 'dbus'
pkgname=dbus
version=1.16.2
revision=2
build_style=meson
configure_args="-Dselinux=disabled -Dinotify=enabled -Ddbus_user=dbus
 -Dxml_docs=enabled -Ddoxygen_docs=disabled -Depoll=enabled
 -Dasserts=false -Dsystemd=disabled -Duser_session=false
 -Dsystem_socket=/run/dbus/system_bus_socket -Dsystem_pid_file=/run/dbus/pid"
hostmakedepends="gettext pkg-config xmlto"
makedepends="expat-devel libX11-devel libcap-devel"
short_desc="Message bus system"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://dbus.freedesktop.org/"
changelog="https://gitlab.freedesktop.org/dbus/dbus/-/raw/dbus-1.16/NEWS"
distfiles="https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.xz"
checksum=0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2
python_version=3
conf_files="/etc/dbus-1/*.conf"
replaces="dbus-elogind>=0"

system_accounts="dbus:22"

post_install() {
	vsv dbus
}

dbus-devel_package() {
	depends="expat-devel dbus-libs>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/dbus-*"
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		vmove usr/share/doc
		vmove usr/lib/cmake
	}
}

dbus-libs_package() {
	short_desc+=" - shared libraries"
	replaces="dbus-elogind-libs>=0"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}

dbus-x11_package() {
	short_desc+=" - X11 support"
	replaces="dbus-elogind-x11>=0"
	pkg_install() {
		vmove usr/bin/dbus-launch
		vmove usr/share/man/man1/dbus-launch.1
	}
}

dbus-elogind_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" (transitional dummy package)"
	metapackage=yes
}

dbus-elogind-libs_package() {
	depends="${sourcepkg}-libs>=${version}_${revision}"
	short_desc+=" - shared libraries (transitional dummy package)"
	metapackage=yes
}

dbus-elogind-x11_package() {
	depends="${sourcepkg}-x11>=${version}_${revision}"
	short_desc+=" - X11 support (transitional dummy package)"
	metapackage=yes
}
