From 1ba47c923f397aae6b729736ebb03ef3c1537e03 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 16 Apr 2021 23:55:21 +0100 Subject: sys-libs/libutempter: multilib--, tidy up ebuild Signed-off-by: Sam James --- sys-libs/libutempter/libutempter-1.1.6-r3.ebuild | 23 +++++++++++----------- sys-libs/libutempter/libutempter-1.2.0.ebuild | 25 ++++++++++++------------ sys-libs/libutempter/libutempter-1.2.1.ebuild | 25 ++++++++++++------------ 3 files changed, 38 insertions(+), 35 deletions(-) (limited to 'sys-libs') diff --git a/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild b/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild index 7d8cc191d940..326b59190559 100644 --- a/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild +++ b/sys-libs/libutempter/libutempter-1.1.6-r3.ebuild @@ -3,7 +3,7 @@ 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 } 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 } diff --git a/sys-libs/libutempter/libutempter-1.2.1.ebuild b/sys-libs/libutempter/libutempter-1.2.1.ebuild index bf423adf43ea..a6b93b7b049f 100644 --- a/sys-libs/libutempter/libutempter-1.2.1.ebuild +++ b/sys-libs/libutempter/libutempter-1.2.1.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 } -- cgit v1.2.3-65-gdbad