summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2012-11-26 15:57:45 +0000
committerChristoph Junghans <ottxor@gentoo.org>2012-11-26 15:57:45 +0000
commit9ab870701cd2671b6bbbb63ac3e415f01070d273 (patch)
tree6fea8552d1904ab561b8150ff19658255016b503 /sys-libs
parentTypo, probably caused by strange font in pms.pdf (bug #444740, thanks to Alph... (diff)
downloadgentoo-2-9ab870701cd2671b6bbbb63ac3e415f01070d273.tar.gz
gentoo-2-9ab870701cd2671b6bbbb63ac3e415f01070d273.tar.bz2
gentoo-2-9ab870701cd2671b6bbbb63ac3e415f01070d273.zip
added prefix support (bug #444730)
(Portage version: 2.2.0_alpha142/cvs/Linux i686, signed Manifest commit with key C2000586)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libutempter/ChangeLog9
-rw-r--r--sys-libs/libutempter/libutempter-1.1.6-r1.ebuild70
2 files changed, 77 insertions, 2 deletions
diff --git a/sys-libs/libutempter/ChangeLog b/sys-libs/libutempter/ChangeLog
index e9d48bfe83b3..6bdc40d6b465 100644
--- a/sys-libs/libutempter/ChangeLog
+++ b/sys-libs/libutempter/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-libs/libutempter
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libutempter/ChangeLog,v 1.38 2012/08/28 06:51:59 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libutempter/ChangeLog,v 1.39 2012/11/26 15:57:45 ottxor Exp $
+
+*libutempter-1.1.6-r1 (26 Nov 2012)
+
+ 26 Nov 2012; Christoph Junghans <ottxor@gentoo.org>
+ +libutempter-1.1.6-r1.ebuild:
+ added prefix support (bug #444730)
*libutempter-1.1.6 (28 Aug 2012)
@@ -154,4 +160,3 @@
freebsd, and also mike harris of redhat/freedesktop is rumoured to be
rejumping the development of this. At any rate, at least Flameeyes will
be happy.
-
diff --git a/sys-libs/libutempter/libutempter-1.1.6-r1.ebuild b/sys-libs/libutempter/libutempter-1.1.6-r1.ebuild
new file mode 100644
index 000000000000..b69531ef8417
--- /dev/null
+++ b/sys-libs/libutempter/libutempter-1.1.6-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libutempter/libutempter-1.1.6-r1.ebuild,v 1.1 2012/11/26 15:57:45 ottxor Exp $
+
+EAPI="4"
+
+inherit user multilib flag-o-matic
+
+DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info, which need root access"
+HOMEPAGE="http://altlinux.org/index.php?module=sisyphus&package=libutempter"
+SRC_URI="ftp://ftp.altlinux.org/pub/people/ldv/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs elibc_FreeBSD"
+
+RDEPEND="!sys-apps/utempter"
+
+pkg_setup() {
+ enewgroup utmp 406
+}
+
+src_prepare() {
+ local args=(
+ -e "/^libdir /s:/usr/lib:${EPREFIX}/usr/$(get_libdir):"
+ -e '/^libexecdir /s:=.*:= $(libdir)/misc:'
+ -e '/^CFLAGS = $(RPM_OPT_FLAGS)/d'
+ -e 's:,-stats::'
+ -e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:"
+ -e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:"
+ )
+ use static-libs || args+=(
+ -e '/^STATICLIB/d'
+ -e '/INSTALL.*STATICLIB/d'
+ )
+ sed -i "${args[@]}" Makefile || die
+}
+
+src_configure() {
+ use elibc_FreeBSD && append-libs -lutil
+ tc-export CC
+}
+
+src_compile() {
+ emake LDLIBS="${LIBS}"
+}
+
+src_install() {
+ default
+
+ if ! use prefix ; then
+ fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter
+ fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter
+ fi
+ dodir /usr/sbin
+ dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter
+}
+
+pkg_postinst() {
+ if [ -f "${EROOT}/var/log/wtmp" ] ; then
+ chown root:utmp "${EROOT}/var/log/wtmp"
+ chmod 664 "${EROOT}/var/log/wtmp"
+ fi
+
+ if [ -f "${EROOT}/var/run/utmp" ] ; then
+ chown root:utmp "${EROOT}/var/run/utmp"
+ chmod 664 "${EROOT}/var/run/utmp"
+ fi
+}