diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-24 05:37:41 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-24 05:37:41 +0000 |
commit | d789797d5a8414cd1b994dc39c02a2be99dd81df (patch) | |
tree | 7b8304b8cffba3d9aabef0c5ba4fe0242b704a60 /sys-libs | |
parent | Fix header. (diff) | |
download | historical-d789797d5a8414cd1b994dc39c02a2be99dd81df.tar.gz historical-d789797d5a8414cd1b994dc39c02a2be99dd81df.tar.bz2 historical-d789797d5a8414cd1b994dc39c02a2be99dd81df.zip |
Rewrite ebuild to EAPI=4, and add static-libs support #378295 by Agostino Sarubbo.
Package-Manager: portage-2.2.0_alpha107_p3/cvs/Linux x86_64
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libutempter/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libutempter/libutempter-1.1.5-r1.ebuild | 66 |
2 files changed, 73 insertions, 1 deletions
diff --git a/sys-libs/libutempter/ChangeLog b/sys-libs/libutempter/ChangeLog index 8c8f9b67228f..0e2e89a687b6 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.36 2012/05/24 05:35:33 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libutempter/ChangeLog,v 1.37 2012/05/24 05:37:41 vapier Exp $ + +*libutempter-1.1.5-r1 (24 May 2012) + + 24 May 2012; Mike Frysinger <vapier@gentoo.org> +libutempter-1.1.5-r1.ebuild: + Rewrite ebuild to EAPI=4, and add static-libs support #378295 by Agostino + Sarubbo. 24 May 2012; Mike Frysinger <vapier@gentoo.org> libutempter-1.1.5.ebuild: Update inherits to match what is used. diff --git a/sys-libs/libutempter/libutempter-1.1.5-r1.ebuild b/sys-libs/libutempter/libutempter-1.1.5-r1.ebuild new file mode 100644 index 000000000000..a91cd05bb4f5 --- /dev/null +++ b/sys-libs/libutempter/libutempter-1.1.5-r1.ebuild @@ -0,0 +1,66 @@ +# 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.5-r1.ebuild,v 1.1 2012/05/24 05:37:41 vapier 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" +IUSE="static-libs elibc_FreeBSD" + +RDEPEND="!sys-apps/utempter" + +pkg_setup() { + enewgroup utmp 406 +} + +src_prepare() { + local args=( + -e "/^libdir /s:/lib:/$(get_libdir):" + -e '/^libexecdir /s:=.*:= $(libdir)/misc:' + -e '/^CFLAGS = $(RPM_OPT_FLAGS)/d' + -e 's:,-stats::' + ) + 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 + + fowners root:utmp /usr/$(get_libdir)/misc/utempter/utempter + fperms 2755 /usr/$(get_libdir)/misc/utempter/utempter + dodir /usr/sbin + dosym ../$(get_libdir)/misc/utempter/utempter /usr/sbin/utempter +} + +pkg_postinst() { + if [ -f "${ROOT}/var/log/wtmp" ] ; then + chown root:utmp "${ROOT}/var/log/wtmp" + chmod 664 "${ROOT}/var/log/wtmp" + fi + + if [ -f "${ROOT}/var/run/utmp" ] ; then + chown root:utmp "${ROOT}/var/run/utmp" + chmod 664 "${ROOT}/var/run/utmp" + fi +} |