diff options
Diffstat (limited to 'sys-libs/libutempter/libutempter-1.2.0.ebuild')
-rw-r--r-- | sys-libs/libutempter/libutempter-1.2.0.ebuild | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sys-libs/libutempter/libutempter-1.2.0.ebuild b/sys-libs/libutempter/libutempter-1.2.0.ebuild index 271a41f8bde7..1df07ce3ed22 100644 --- a/sys-libs/libutempter/libutempter-1.2.0.ebuild +++ b/sys-libs/libutempter/libutempter-1.2.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs DESCRIPTION="Library that allows non-privileged apps to write utmp (login) info" HOMEPAGE="https://altlinux.org/index.php?module=sisyphus&package=libutempter" @@ -30,10 +30,14 @@ src_prepare() { -e "/^includedir /s:/usr/include:${EPREFIX}/usr/include:" -e "/^mandir /s:=.*:= ${EPREFIX}/usr/share/man:" ) - use static-libs || args+=( + + if ! use static-libs ; then + args+=( -e '/^STATICLIB/d' -e '/INSTALL.*STATICLIB/d' ) + fi + sed -i "${args[@]}" Makefile || die } @@ -53,18 +57,15 @@ src_install() { 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 + local path + for path in "${EROOT}"/var/log/{w,u}tmp; do + chown root:utmp "${path}" + chmod 664 "${path}" + done } |