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 | |
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')
-rw-r--r-- | sys-apps/utempter/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/utempter/files/utempter-0.5.5.6-build.patch | 11 | ||||
-rw-r--r-- | sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch (renamed from sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch) | 29 | ||||
-rw-r--r-- | sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch | 4 | ||||
-rw-r--r-- | sys-apps/utempter/utempter-0.5.5.6.ebuild | 48 |
5 files changed, 52 insertions, 42 deletions
diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest index 8b18dda0755b..031d8a62a834 100644 --- a/sys-apps/utempter/Manifest +++ b/sys-apps/utempter/Manifest @@ -1 +1 @@ -DIST utempter-0.5.5-6.src.rpm 21099 SHA256 617c28d579fa54349b8a706e8346c2442f2ef39523db7e0501701a0919651f3c SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 WHIRLPOOL 3ae0a32eae886f2ac14dcf36b4e96e4bb8c25966389c6608a83673149a3045b580b35832e5c69836a18a4f88b55e8c20d254470f84424e30f758a820a87ce13a +DIST utempter-0.5.5-6.src.rpm 21099 BLAKE2B a4a8c53ab31d53ec56d60a16e5c1d3a0a2ec6c73c3c3025c15dfc389da75f969545392b46976017cfcde1d9f9ca974b14786bbf39709aebdda890df13a7866ed SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch b/sys-apps/utempter/files/utempter-0.5.5.6-build.patch deleted file mode 100644 index 8fbfb111196f..000000000000 --- a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile -+++ Makefile -@@ -37,7 +37,7 @@ - ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) - - $(SHAREDLIB): utmpintf.os -- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc -+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc - - utmpintf.o: utmpintf.c utempter.h - diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch index 123c77eb357c..83b41a04b25f 100644 --- a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch +++ b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch @@ -1,6 +1,6 @@ ---- Makefile.orig 2005-04-15 08:54:32.000000000 -0400 -+++ Makefile 2005-04-15 08:56:17.000000000 -0400 -@@ -5,6 +5,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -5,12 +5,14 @@ CVSROOT=$(shell cat CVS/Root) # major number of the .so lib SOMAJOR = 0 @@ -11,7 +11,22 @@ SHAREDLIB = lib$(NAME).so SONAME = $(SHAREDLIB).$(SOMAJOR) -@@ -29,6 +33,8 @@ + +-CFLAGS = -Wall $(RPM_OPT_FLAGS) +- + TARGETS = $(NAME) utmp $(SHAREDLIB) + + all: $(TARGETS) +@@ -19,7 +21,7 @@ + rm -f *.so utempter utmp *.os + + %.os : %.c +- $(CC) -c $(CFLAGS) -fPIC $< -o $@ ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC $< -o $@ + + install: + mkdir -p $(RPM_BUILD_ROOT)/usr/sbin +@@ -29,9 +31,11 @@ install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION) ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB) @@ -19,4 +34,8 @@ + ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) $(SHAREDLIB): utmpintf.os - $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc +- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc ++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc $(LIBS) + + utmpintf.o: utmpintf.c utempter.h + diff --git a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch index 8644db837f4a..b6fc7ea7d27e 100644 --- a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch +++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch @@ -1,5 +1,5 @@ ---- utempter-0.5.5/utempter.c.mps 2004-12-11 14:54:06.000000000 +0100 -+++ utempter-0.5.5/utempter.c 2004-12-11 14:57:46.000000000 +0100 +--- a/utempter.c ++++ b/utempter.c @@ -11,7 +11,9 @@ #include <sys/stat.h> #include <sys/sysmacros.h> 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 } |