summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2016-12-02 12:17:43 +0100
committerSven Eden <sven.eden@gmx.de>2016-12-02 12:17:43 +0100
commit01ccbe795929643b1eb8e91feafbf2144aedcdfd (patch)
tree72afb6245ee1abf3ddb18adc45e329c659672e7f /sys-auth/elogind/elogind-219.12-r10.ebuild
parentsys-apps/dbus-1.10.14-r1 : Version bump with elogind support (diff)
downloadseden-01ccbe795929643b1eb8e91feafbf2144aedcdfd.tar.gz
seden-01ccbe795929643b1eb8e91feafbf2144aedcdfd.tar.bz2
seden-01ccbe795929643b1eb8e91feafbf2144aedcdfd.zip
sys-auth/elogind-219.12-r10 : Update init script to create a /run/systemd directory
Diffstat (limited to 'sys-auth/elogind/elogind-219.12-r10.ebuild')
-rw-r--r--sys-auth/elogind/elogind-219.12-r10.ebuild134
1 files changed, 134 insertions, 0 deletions
diff --git a/sys-auth/elogind/elogind-219.12-r10.ebuild b/sys-auth/elogind/elogind-219.12-r10.ebuild
new file mode 100644
index 0000000..fabf75d
--- /dev/null
+++ b/sys-auth/elogind/elogind-219.12-r10.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils linux-info pam udev
+
+DESCRIPTION="The systemd project's logind, extracted to a standalone package"
+HOMEPAGE="https://github.com/wingo/elogind"
+SRC_URI="https://github.com/wingo/elogind/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE="acl apparmor pam policykit selinux +seccomp"
+
+COMMON_DEPEND="
+ sys-libs/libcap
+ sys-apps/util-linux
+ virtual/libudev:=
+ acl? ( sys-apps/acl )
+ apparmor? ( sys-libs/libapparmor )
+ pam? ( virtual/pam )
+ seccomp? ( sys-libs/libseccomp )
+ selinux? ( sys-libs/libselinux )
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/dbus
+ policykit? ( sys-auth/polkit )
+ !sys-auth/systemd
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gperf
+ dev-util/intltool
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docs.patch"
+ "${FILESDIR}/${PN}-lrt.patch"
+ "${FILESDIR}/${P}-session.patch"
+ "${FILESDIR}/${PN}-add_missing_login1_permissions.patch"
+)
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-info_pkg_setup
+ if ! linux_config_exists; then
+ ewarn "Can't check the linux kernel configuration."
+ else
+ local missing_count=0
+ if ! linux_chkconfig_present CGROUPS; then
+ eerror "CGROUPS is not enabled but needed by elogind."
+ eerror " (it is OK to disable all controllers)"
+ missing_count=$((missing_count+1))
+ fi
+ if ! linux_chkconfig_present INOTIFY_USER; then
+ eerror "INOTIFY_USER is not enabled but needed by elogind."
+ missing_count=$((missing_count+1))
+ fi
+ if ! linux_chkconfig_present SIGNALFD; then
+ eerror "SIGNALFD is not enabled but needed by elogind."
+ missing_count=$((missing_count+1))
+ fi
+ if ! linux_chkconfig_present TIMERFD; then
+ eerror "TIMERFD is not enabled but needed by elogind."
+ missing_count=$((missing_count+1))
+ fi
+ if ! linux_chkconfig_present EPOLL; then
+ eerror "EPOLL is not enabled but needed by elogind."
+ missing_count=$((missing_count+1))
+ fi
+ if ! linux_chkconfig_present SECCOMP; then
+ einfo "SECCOMP is not enabled but useful to elogind."
+ fi
+ [ 0 -lt $missing_count ] && die "$missing_count required kernel features are missing."
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Makefile.am is patched by
+ # - "${FILESDIR}/${PN}-docs.patch"
+ # - "${FILESDIR}/${PN}-lrt.patch"
+ eautoreconf
+}
+
+src_configure() {
+ local use_smack="--disable-smack"
+ if linux_config_exists && linux_chkconfig_present SECURITY_SMACK; then
+ use_smack="--enable-smack"
+ fi
+
+ econf \
+ --with-pamlibdir=$(getpam_mod_dir) \
+ --with-udevrulesdir="$(get_udevdir)"/rules.d \
+ --libdir=/$(get_libdir) \
+ $(use_enable acl) \
+ $(use_enable apparmor) \
+ $(use_enable pam) \
+ $(use_enable seccomp) \
+ $(use_enable selinux) \
+ $use_smack
+}
+
+src_install() {
+ default
+
+ # Installation would fail with
+ # "static archives (*.a) and libtool library files
+ # (*.la) belong in /usr/lib*, not /lib*"
+ # if we didn't prune them.
+ prune_libtool_files --modules
+
+ # Unfortunately the build system puts the pkgconfig file(s)
+ # into $(libdir)/pkgconfig - Move it to /usr/$(libdir)/pkgconfig
+ mkdir -p "${ED}"usr/$(get_libdir) || die
+ mv "${ED}"$(get_libdir)/pkgconfig "${ED}"usr/$(get_libdir)/ || die
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+}
+
+pkg_postinst() {
+ if [ "$(rc-config list default | grep elogind)" = "" ]; then
+ ewarn "To enable the elogind daemon, elogind must be"
+ ewarn "added to the default runlevel:"
+ ewarn "# rc-update add elogind default"
+ fi
+}