diff options
author | David Seifert <soap@gentoo.org> | 2017-12-02 15:49:59 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-12-02 17:14:26 +0100 |
commit | ed24ab01691c2d03fc21562f78b6a05e71803d62 (patch) | |
tree | 8cec67bfabf8dadf6bde893c0456aff707467d30 /sys-apps/utempter/utempter-0.5.5.6.ebuild | |
parent | sys-apps/vbetool: Port to EAPI 6 (diff) | |
download | gentoo-ed24ab01691c2d03fc21562f78b6a05e71803d62.tar.gz gentoo-ed24ab01691c2d03fc21562f78b6a05e71803d62.tar.bz2 gentoo-ed24ab01691c2d03fc21562f78b6a05e71803d62.zip |
sys-apps/utempter: Port to EAPI 6
Package-Manager: Portage-2.3.16, Repoman-2.3.6
Diffstat (limited to 'sys-apps/utempter/utempter-0.5.5.6.ebuild')
-rw-r--r-- | sys-apps/utempter/utempter-0.5.5.6.ebuild | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/sys-apps/utempter/utempter-0.5.5.6.ebuild b/sys-apps/utempter/utempter-0.5.5.6.ebuild index 4866160d3cd1..6fd2931dcb40 100644 --- a/sys-apps/utempter/utempter-0.5.5.6.ebuild +++ b/sys-apps/utempter/utempter-0.5.5.6.ebuild @@ -1,10 +1,12 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -inherit rpm eutils user +EAPI=6 + +inherit flag-o-matic rpm toolchain-funcs user MY_P=${P%.*}-${PV##*.} -S=${WORKDIR}/${P%.*} + DESCRIPTION="App that allows non-privileged apps to write utmp (login) info" HOMEPAGE="https://www.redhat.com/" SRC_URI="mirror://gentoo/${MY_P}.src.rpm" @@ -14,43 +16,43 @@ SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" IUSE="" -RDEPEND="!sys-libs/libutempter +RDEPEND=" + !sys-libs/libutempter !dev-python/utmp" +S=${WORKDIR}/${P%.*} +PATCHES=( + "${FILESDIR}"/${P}-no_utmpx.patch + "${FILESDIR}"/${P}-fix-build-system.patch +) + pkg_setup() { enewgroup utmp 406 } -src_unpack() { - rpm_src_unpack - cd "${S}" - epatch "${FILESDIR}"/${P}-soname-makefile-fix.patch - epatch "${FILESDIR}"/${P}-no_utmpx.patch - epatch "${FILESDIR}"/${P}-build.patch -} - -src_compile() { - emake RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" || die +src_configure() { + tc-export CC + append-cflags -Wall } src_install() { emake \ - RPM_BUILD_ROOT="${D}" \ + RPM_BUILD_ROOT="${ED}" \ LIBDIR=/usr/$(get_libdir) \ - install || die - dobin utmp || die + install + dobin utmp fowners root:utmp /usr/sbin/utempter fperms 2755 /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 + if [[ -f "${EROOT%/}"/var/log/wtmp ]] ; then + chown root:utmp "${EROOT%/}"/var/log/wtmp + chmod 664 "${EROOT%/}"/var/log/wtmp fi - if [ -f "${ROOT}"/var/run/utmp ] ; then - chown root:utmp "${ROOT}"/var/run/utmp - chmod 664 "${ROOT}"/var/run/utmp + if [[ -f "${EROOT%/}"/var/run/utmp ]] ; then + chown root:utmp "${EROOT%/}"/var/run/utmp + chmod 664 "${EROOT%/}"/var/run/utmp fi } |