aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-01-13 22:32:06 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-01-14 00:04:20 +0100
commit5883091dc660de25d6e8425673c729f903ab3149 (patch)
tree13a3583fe1b5913d7c2f0b5f2dc1f2f28f0bad32 /sys-auth
parentkde-plasma/plasma-workspace: Fix SRC_URI (diff)
downloadkde-5883091dc660de25d6e8425673c729f903ab3149.tar.gz
kde-5883091dc660de25d6e8425673c729f903ab3149.tar.bz2
kde-5883091dc660de25d6e8425673c729f903ab3149.zip
sys-auth/elogind: Pin gperf dep to 3.0*, fix install location
Gentoo-bug: 599474 Thanks-to: Sven Eden <yamakuzure@gmx.net> Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/elogind/elogind-219.12-r4.ebuild95
1 files changed, 95 insertions, 0 deletions
diff --git a/sys-auth/elogind/elogind-219.12-r4.ebuild b/sys-auth/elogind/elogind-219.12-r4.ebuild
new file mode 100644
index 0000000000..3b419cb35b
--- /dev/null
+++ b/sys-auth/elogind/elogind-219.12-r4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools 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="~amd64 ~arm ~x86"
+IUSE="acl apparmor pam policykit +seccomp selinux"
+
+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-3.0*
+ dev-util/intltool
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-docs.patch"
+ "${FILESDIR}/${PN}-lrt.patch"
+ "${FILESDIR}/${P}-session.patch"
+ "${FILESDIR}/${P}-login1-perms.patch"
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK
+ ~SIGNALFD ~TIMERFD"
+
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP"
+
+ if use kernel_linux; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf # Makefile.am patched by "${FILESDIR}/${PN}-{docs,lrt}.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 apparmor) \
+ $(use_enable pam) \
+ $(use_enable seccomp) \
+ $(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
+}