Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/elogind/
Date: Fri, 26 Apr 2019 20:19:53
Message-Id: 1556309974.92ae7c581f9cab47c4901584efd30e7502d6705c.anarchy@gentoo
1 commit: 92ae7c581f9cab47c4901584efd30e7502d6705c
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 26 02:51:22 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 26 20:19:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92ae7c58
7
8 sys-auth/elogind: version bump, misc fixes
9
10 Package-Manager: Portage-2.3.64, Repoman-2.3.12
11 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
12
13 sys-auth/elogind/elogind-241.3.ebuild | 127 ++++++++++++++++++++++++++++++++++
14 1 file changed, 127 insertions(+)
15
16 diff --git a/sys-auth/elogind/elogind-241.3.ebuild b/sys-auth/elogind/elogind-241.3.ebuild
17 new file mode 100644
18 index 00000000000..858ace68ac6
19 --- /dev/null
20 +++ b/sys-auth/elogind/elogind-241.3.ebuild
21 @@ -0,0 +1,127 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit linux-info meson pam udev xdg-utils
28 +
29 +DESCRIPTION="The systemd project's logind, extracted to a standalone package"
30 +HOMEPAGE="https://github.com/elogind/elogind"
31 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
32 +
33 +LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
36 +IUSE="+acl debug doc +pam +policykit selinux"
37 +
38 +COMMON_DEPEND="
39 + sys-apps/util-linux
40 + sys-libs/libcap
41 + virtual/libudev:=
42 + acl? ( sys-apps/acl )
43 + pam? ( virtual/pam )
44 + selinux? ( sys-libs/libselinux )
45 +"
46 +DEPEND="${COMMON_DEPEND}
47 + app-text/docbook-xml-dtd:4.2
48 + app-text/docbook-xml-dtd:4.5
49 + app-text/docbook-xsl-stylesheets
50 + dev-util/gperf
51 + dev-util/intltool
52 + sys-devel/libtool
53 + virtual/pkgconfig
54 +"
55 +RDEPEND="${COMMON_DEPEND}
56 + !sys-apps/systemd
57 +"
58 +PDEPEND="
59 + sys-apps/dbus
60 + policykit? ( sys-auth/polkit )
61 +"
62 +
63 +DOCS=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
64 +
65 +PATCHES=( "${FILESDIR}/${PN}-241.1-docs.patch" )
66 +
67 +pkg_setup() {
68 + local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD"
69 +
70 + use kernel_linux && linux-info_pkg_setup
71 +}
72 +
73 +src_prepare() {
74 + default
75 + xdg_environment_reset
76 +}
77 +
78 +src_configure() {
79 + local rccgroupmode="$(grep rc_cgroup_mode /etc/rc.conf | cut -d '"' -f 2)"
80 + local cgroupmode="legacy"
81 +
82 + if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
83 + cgroupmode="hybrid"
84 + elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
85 + cgroupmode="unified"
86 + fi
87 +
88 + local emesonargs=(
89 + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
90 + -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
91 + -Dpamlibdir=$(getpam_mod_dir)
92 + -Dudevrulesdir="$(get_udevdir)"/rules.d
93 + --libdir="${EPREFIX}"/usr/$(get_libdir)
94 + -Drootlibdir="${EPREFIX}"/$(get_libdir)
95 + -Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind
96 + -Drootprefix="${EPREFIX}/"
97 + -Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
98 + -Dman=auto
99 + -Dsmack=true
100 + -Dcgroup-controller=openrc
101 + -Ddefault-hierarchy=${cgroupmode}
102 + -Ddefault-kill-user-processes=false
103 + -Dacl=$(usex acl true false)
104 + --buildtype $(usex debug debug release)
105 + -Dhtml=$(usex doc auto false)
106 + -Dpam=$(usex pam true false)
107 + -Dselinux=$(usex selinux true false)
108 + -Dutmp=$(usex elibc_musl false true)
109 + )
110 +
111 + meson_src_configure
112 +}
113 +
114 +src_install() {
115 + DOCS+=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
116 +
117 + meson_src_install
118 +
119 + newinitd "${FILESDIR}"/${PN}.init ${PN}
120 +
121 + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
122 + newconfd ${PN}.conf ${PN}
123 +}
124 +
125 +pkg_postinst() {
126 + if [[ "$(rc-config list boot | grep elogind)" != "" ]]; then
127 + elog "elogind is currently started from boot runlevel."
128 + elif [[ "$(rc-config list default | grep elogind)" != "" ]]; then
129 + ewarn "elogind is currently started from default runlevel."
130 + ewarn "Please remove elogind from the default runlevel and"
131 + ewarn "add it to the boot runlevel by:"
132 + ewarn "# rc-update del elogind default"
133 + ewarn "# rc-update add elogind boot"
134 + else
135 + elog "elogind is currently not started from any runlevel."
136 + elog "You may add it to the boot runlevel by:"
137 + elog "# rc-update add elogind boot"
138 + elog
139 + elog "Alternatively, you can leave elogind out of any"
140 + elog "runlevel. It will then be started automatically"
141 + if use pam; then
142 + elog "when the first service calls it via dbus, or"
143 + elog "the first user logs into the system."
144 + else
145 + elog "when the first service calls it via dbus."
146 + fi
147 + fi
148 +}