openrc-settingsd-1.0.1.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. DESCRIPTION="System settings D-Bus service for OpenRC"
  5. HOMEPAGE="https://gnome.gentoo.org/openrc-settingsd.xml"
  6. SRC_URI="https://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}.tar.xz"
  7. LICENSE="GPL-2+"
  8. SLOT="0"
  9. KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
  10. IUSE="systemd"
  11. COMMON_DEPEND=">=dev-libs/glib-2.30:2
  12. dev-libs/libdaemon
  13. sys-apps/dbus
  14. sys-apps/openrc:=
  15. sys-auth/polkit"
  16. RDEPEND="${COMMON_DEPEND}
  17. systemd? ( >=sys-apps/systemd-197 )
  18. !systemd? ( sys-auth/nss-myhostname !sys-apps/systemd )"
  19. DEPEND="${COMMON_DEPEND}
  20. app-arch/xz-utils
  21. dev-util/gdbus-codegen
  22. virtual/pkgconfig"
  23. src_configure() {
  24. econf \
  25. --with-pidfile="${EPREFIX}"/var/run/openrc-settingsd.pid
  26. }
  27. src_install() {
  28. default
  29. if use systemd; then
  30. # Avoid file collision with systemd
  31. rm -vr "${ED}"usr/share/{dbus-1,polkit-1} "${ED}"etc/dbus-1 || die "rm failed"
  32. fi
  33. }
  34. pkg_postinst() {
  35. if use systemd; then
  36. elog "You installed ${PN} with USE=systemd. In this mode,"
  37. elog "${PN} will not start via simple dbus activation, so you"
  38. elog "will have to manually enable it as an rc service:"
  39. elog " # /etc/init.d/openrc-settingsd start"
  40. elog " # rc-update add openrc-settingsd default"
  41. fi
  42. }