seatd-0.9.1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 2020-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit meson systemd
  5. DESCRIPTION="Minimal seat management daemon and universal library"
  6. HOMEPAGE="https://sr.ht/~kennylevinsen/seatd"
  7. if [[ ${PV} == 9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://git.sr.ht/~kennylevinsen/seatd"
  10. else
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
  12. SRC_URI="https://git.sr.ht/~kennylevinsen/seatd/archive/${PV}.tar.gz -> ${P}.tar.gz"
  13. fi
  14. LICENSE="MIT"
  15. SLOT="0/1"
  16. IUSE="builtin elogind examples +server systemd man"
  17. REQUIRED_USE="?? ( elogind systemd )"
  18. DEPEND="
  19. elogind? ( sys-auth/elogind )
  20. systemd? ( sys-apps/systemd:= )
  21. "
  22. RDEPEND="${DEPEND}
  23. server? ( acct-group/seat )
  24. "
  25. BDEPEND="man? ( >=app-text/scdoc-1.9.7 )"
  26. src_configure() {
  27. local emesonargs=(
  28. -Dwerror=false
  29. $(meson_feature man man-pages)
  30. $(meson_feature builtin libseat-builtin)
  31. $(meson_feature server)
  32. $(meson_feature examples)
  33. )
  34. if use elogind ; then
  35. emesonargs+=( -Dlibseat-logind=elogind )
  36. elif use systemd; then
  37. emesonargs+=( -Dlibseat-logind=systemd )
  38. else
  39. emesonargs+=( -Dlibseat-logind=disabled )
  40. fi
  41. meson_src_configure
  42. }
  43. src_install() {
  44. meson_src_install
  45. if use server; then
  46. use elogind && newinitd "${FILESDIR}/seatd.initd-r1" seatd
  47. use systemd && systemd_dounit contrib/systemd/seatd.service
  48. if has_version '<sys-auth/seatd-0.7.0-r2'; then
  49. elog "For OpenRC users: seatd is now using the 'seat' group instead of the 'video' group"
  50. elog "Make sure your user(s) are in the 'seat' group."
  51. elog "Note: 'video' is still needed for GPU access like OpenGL"
  52. fi
  53. fi
  54. }