pkgname=dbus-glib
pkgver=0.114
pkgdesc="D-Bus bindings for glib"
homepage="https://dbus.freedesktop.org/"
license=("GPL-2")
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://dbus.freedesktop.org/releases/${pkgname}/${sources[0]}")
sha512sums=("c341cc0778edbf776d3e1a6d3cd9c136766544cb4b7239d6affa2fa246fa9c5716fe4d674c9bb56b36ee140344663bf967f70841ad132f978a662a22cc9a3a0d")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  local conf_args=(
    --prefix=/usr
    --sysconfdir=/etc
    --localstatedir=/var
    --enable-bash-completion
    --disable-gtk-doc
    --disable-asserts
    --disable-static
  )
  ./configure "${conf_args[@]}"
  make
}

src_install() {
  make DESTDIR="$pkgdir" install
  install -vDm644 "${pkgdir}"/etc/bash_completion.d/dbus-bash-completion.sh "${pkgdir}"/usr/share/bash-completion/completions/dbus-send
  rm -r "${pkgdir}"/etc
}

# vim:ft=sh syn=sh et sw=2:
