diff options
author | Michael Palimaka <kensington@gentoo.org> | 2017-02-20 22:17:58 +1100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2017-02-20 22:19:06 +1100 |
commit | 4a2d803749f9fc7c068ab5d77257eebe43812230 (patch) | |
tree | 812d6496d64e0216f68998ea5c5cf248d0c559d9 /sys-auth | |
parent | Documentation: Regenerate files (diff) | |
download | kde-4a2d803749f9fc7c068ab5d77257eebe43812230.tar.gz kde-4a2d803749f9fc7c068ab5d77257eebe43812230.tar.bz2 kde-4a2d803749f9fc7c068ab5d77257eebe43812230.zip |
sys-auth/elogind: add live ebuild
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/elogind/elogind-9999.ebuild | 90 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-docs.patch | 15 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind.conf | 7 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind.init | 32 | ||||
-rw-r--r-- | sys-auth/elogind/metadata.xml | 10 |
5 files changed, 154 insertions, 0 deletions
diff --git a/sys-auth/elogind/elogind-9999.ebuild b/sys-auth/elogind/elogind-9999.ebuild new file mode 100644 index 0000000000..38df8c18de --- /dev/null +++ b/sys-auth/elogind/elogind-9999.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools git-r3 linux-info pam udev + +DESCRIPTION="The systemd project's logind, extracted to a standalone package" +HOMEPAGE="https://github.com/elogind/elogind" +EGIT_REPO_URI="https://github.com/elogind/elogind.git" +EGIT_BRANCH="dev_v226" + +LICENSE="CC0-1.0 LGPL-2.1+ public-domain" +SLOT="0" +KEYWORDS="" +IUSE="acl pam policykit selinux" + +COMMON_DEPEND=" + sys-apps/util-linux + sys-libs/libcap + virtual/libudev:= + acl? ( sys-apps/acl ) + pam? ( virtual/pam ) + selinux? ( sys-libs/libselinux ) +" +RDEPEND="${COMMON_DEPEND} + sys-apps/dbus + !sys-apps/systemd +" +DEPEND="${COMMON_DEPEND} + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-util/gperf + dev-util/intltool + sys-devel/libtool + virtual/pkgconfig +" +PDEPEND="policykit? ( sys-auth/polkit )" + +PATCHES=( + "${FILESDIR}/${PN}-docs.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK + ~SIGNALFD ~TIMERFD" + + if use kernel_linux; then + linux-info_pkg_setup + fi +} + +src_prepare() { + default + eautoreconf # Makefile.am patched by "${FILESDIR}/${PN}-docs.patch" +} + +src_configure() { + econf \ + --with-pamlibdir=$(getpam_mod_dir) \ + --with-udevrulesdir="$(get_udevdir)"/rules.d \ + --libdir="${EPREFIX}"/$(get_libdir) \ + --enable-smack \ + $(use_enable acl) \ + $(use_enable pam) \ + $(use_enable selinux) +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die + + # Build system ignores --with-rootlibdir and puts pkgconfig below + # /$(libdir) - 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 +} diff --git a/sys-auth/elogind/files/elogind-docs.patch b/sys-auth/elogind/files/elogind-docs.patch new file mode 100644 index 0000000000..b48e52d73a --- /dev/null +++ b/sys-auth/elogind/files/elogind-docs.patch @@ -0,0 +1,15 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -191,12 +191,6 @@ + rootbin_PROGRAMS = + pkglibexec_PROGRAMS = + +-dist_doc_DATA = \ +- README \ +- NEWS \ +- LICENSE.LGPL2.1 \ +- LICENSE.GPL2 +- + @INTLTOOL_POLICY_RULE@ + + # ------------------------------------------------------------------------------ diff --git a/sys-auth/elogind/files/elogind.conf b/sys-auth/elogind/files/elogind.conf new file mode 100644 index 0000000000..73d1336aec --- /dev/null +++ b/sys-auth/elogind/files/elogind.conf @@ -0,0 +1,7 @@ +# /etc/conf.d/elogind: config file for /etc/init.d/elogind + +# this is the elogind executable +ELOGIND_EXEC="/usr/libexec/elogind/elogind" + +# this is where elogind will store its pid file +ELOGIND_PIDFILE="/var/run/elogind.pid" diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init new file mode 100644 index 0000000000..04ce34ab4c --- /dev/null +++ b/sys-auth/elogind/files/elogind.init @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need dbus + + # Make sure elogind is up before xdm starts any dm + before xdm +} + +start() { + ebegin "Starting elogind" + + # elogind needs a /run/systemd directory + if [[ ! -e /run/systemd ]]; then + mkdir -p /run/systemd + chmod 755 /run/systemd + fi + + start-stop-daemon --start --quiet --background \ + --make-pidfile --pidfile "${ELOGIND_PIDFILE}" \ + --exec "${ELOGIND_EXEC}" + eend $? +} + +stop() { + ebegin "Stopping elogind" + start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}" + eend $? +} diff --git a/sys-auth/elogind/metadata.xml b/sys-auth/elogind/metadata.xml new file mode 100644 index 0000000000..927a215253 --- /dev/null +++ b/sys-auth/elogind/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>freedesktop-bugs@gentoo.org</email> + </maintainer> + <use> + <flag name="apparmor">Enable AppArmor support</flag> + </use> +</pkgmetadata> |