pkgname=sdbus-c++
pkgver=2.1.0
pkgdesc="High-level C++ D-Bus library"
homepage="https://github.com/Kistler-Group/sdbus-cpp"
license=("LGPL-2.1+" "Nokia-Qt-LGPL-Exception-1.1")
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=("4247d49f0d5231e2768c0c96fa9c266bbcc340292c9c3d748f9c37ff992b82301faea798300f916e9a5c992d77adfe56186866c91a4c7d4157750ff09ba5a047")

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

src_build() {
  local cmake_args=(
    -D CMAKE_INSTALL_PREFIX=/usr
    -D CMAKE_BUILD_TYPE=release
    -D SDBUSCPP_BUILD_CODEGEN=false
    -D SDBUSCPP_BUILD_DOCS=yes
    -D SDBUSCPP_BUILD_DOXYGEN_DOCS=false
    -D SDBUSCPP_BUILD_LIBSYSTEMD=no
    -D SDBUSCPP_BUILD_TESTS=false
  )
  cmake -B build "${cmake_args[@]}"
  cmake --build build
}

src_install() {
  DESTDIR="$pkgdir" cmake --install build
}

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