1 |
commit: ed24ab01691c2d03fc21562f78b6a05e71803d62 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 2 14:49:59 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 2 16:14:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed24ab01 |
7 |
|
8 |
sys-apps/utempter: Port to EAPI 6 |
9 |
|
10 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/utempter/Manifest | 2 +- |
13 |
.../utempter/files/utempter-0.5.5.6-build.patch | 11 ----- |
14 |
...tch => utempter-0.5.5.6-fix-build-system.patch} | 29 ++++++++++--- |
15 |
.../utempter/files/utempter-0.5.5.6-no_utmpx.patch | 4 +- |
16 |
sys-apps/utempter/utempter-0.5.5.6.ebuild | 48 +++++++++++----------- |
17 |
5 files changed, 52 insertions(+), 42 deletions(-) |
18 |
|
19 |
diff --git a/sys-apps/utempter/Manifest b/sys-apps/utempter/Manifest |
20 |
index 8b18dda0755..031d8a62a83 100644 |
21 |
--- a/sys-apps/utempter/Manifest |
22 |
+++ b/sys-apps/utempter/Manifest |
23 |
@@ -1 +1 @@ |
24 |
-DIST utempter-0.5.5-6.src.rpm 21099 SHA256 617c28d579fa54349b8a706e8346c2442f2ef39523db7e0501701a0919651f3c SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 WHIRLPOOL 3ae0a32eae886f2ac14dcf36b4e96e4bb8c25966389c6608a83673149a3045b580b35832e5c69836a18a4f88b55e8c20d254470f84424e30f758a820a87ce13a |
25 |
+DIST utempter-0.5.5-6.src.rpm 21099 BLAKE2B a4a8c53ab31d53ec56d60a16e5c1d3a0a2ec6c73c3c3025c15dfc389da75f969545392b46976017cfcde1d9f9ca974b14786bbf39709aebdda890df13a7866ed SHA512 81eeac830631922f2d1b2099a559b60bfd21818b38a524d3c5f61aec143b3e70e95a9ccc300f649dd81f515837fe3befaba6b93bb2e22767e71eee7acb711655 |
26 |
|
27 |
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 |
28 |
deleted file mode 100644 |
29 |
index 8fbfb111196..00000000000 |
30 |
--- a/sys-apps/utempter/files/utempter-0.5.5.6-build.patch |
31 |
+++ /dev/null |
32 |
@@ -1,11 +0,0 @@ |
33 |
---- Makefile |
34 |
-+++ Makefile |
35 |
-@@ -37,7 +37,7 @@ |
36 |
- ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) |
37 |
- |
38 |
- $(SHAREDLIB): utmpintf.os |
39 |
-- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc |
40 |
-+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc |
41 |
- |
42 |
- utmpintf.o: utmpintf.c utempter.h |
43 |
- |
44 |
|
45 |
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 |
46 |
similarity index 55% |
47 |
rename from sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch |
48 |
rename to sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch |
49 |
index 123c77eb357..83b41a04b25 100644 |
50 |
--- a/sys-apps/utempter/files/utempter-0.5.5.6-soname-makefile-fix.patch |
51 |
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-fix-build-system.patch |
52 |
@@ -1,6 +1,6 @@ |
53 |
---- Makefile.orig 2005-04-15 08:54:32.000000000 -0400 |
54 |
-+++ Makefile 2005-04-15 08:56:17.000000000 -0400 |
55 |
-@@ -5,6 +5,10 @@ |
56 |
+--- a/Makefile |
57 |
++++ b/Makefile |
58 |
+@@ -5,12 +5,14 @@ |
59 |
CVSROOT=$(shell cat CVS/Root) |
60 |
# major number of the .so lib |
61 |
SOMAJOR = 0 |
62 |
@@ -11,7 +11,22 @@ |
63 |
|
64 |
SHAREDLIB = lib$(NAME).so |
65 |
SONAME = $(SHAREDLIB).$(SOMAJOR) |
66 |
-@@ -29,6 +33,8 @@ |
67 |
+ |
68 |
+-CFLAGS = -Wall $(RPM_OPT_FLAGS) |
69 |
+- |
70 |
+ TARGETS = $(NAME) utmp $(SHAREDLIB) |
71 |
+ |
72 |
+ all: $(TARGETS) |
73 |
+@@ -19,7 +21,7 @@ |
74 |
+ rm -f *.so utempter utmp *.os |
75 |
+ |
76 |
+ %.os : %.c |
77 |
+- $(CC) -c $(CFLAGS) -fPIC $< -o $@ |
78 |
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) -fPIC $< -o $@ |
79 |
+ |
80 |
+ install: |
81 |
+ mkdir -p $(RPM_BUILD_ROOT)/usr/sbin |
82 |
+@@ -29,9 +31,11 @@ |
83 |
install -m 644 utempter.h $(RPM_BUILD_ROOT)/usr/include |
84 |
install -m 644 $(SHAREDLIB) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(VERSION) |
85 |
ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB) |
86 |
@@ -19,4 +34,8 @@ |
87 |
+ ln -sf $(SHAREDLIB).$(VERSION) $(RPM_BUILD_ROOT)/$(LIBDIR)/$(SHAREDLIB).$(SOMAJOR) |
88 |
|
89 |
$(SHAREDLIB): utmpintf.os |
90 |
- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc |
91 |
+- $(CC) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc |
92 |
++ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $^ -lc $(LIBS) |
93 |
+ |
94 |
+ utmpintf.o: utmpintf.c utempter.h |
95 |
+ |
96 |
|
97 |
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 |
98 |
index 8644db837f4..b6fc7ea7d27 100644 |
99 |
--- a/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch |
100 |
+++ b/sys-apps/utempter/files/utempter-0.5.5.6-no_utmpx.patch |
101 |
@@ -1,5 +1,5 @@ |
102 |
---- utempter-0.5.5/utempter.c.mps 2004-12-11 14:54:06.000000000 +0100 |
103 |
-+++ utempter-0.5.5/utempter.c 2004-12-11 14:57:46.000000000 +0100 |
104 |
+--- a/utempter.c |
105 |
++++ b/utempter.c |
106 |
@@ -11,7 +11,9 @@ |
107 |
#include <sys/stat.h> |
108 |
#include <sys/sysmacros.h> |
109 |
|
110 |
diff --git a/sys-apps/utempter/utempter-0.5.5.6.ebuild b/sys-apps/utempter/utempter-0.5.5.6.ebuild |
111 |
index 4866160d3cd..6fd2931dcb4 100644 |
112 |
--- a/sys-apps/utempter/utempter-0.5.5.6.ebuild |
113 |
+++ b/sys-apps/utempter/utempter-0.5.5.6.ebuild |
114 |
@@ -1,10 +1,12 @@ |
115 |
-# Copyright 1999-2015 Gentoo Foundation |
116 |
+# Copyright 1999-2017 Gentoo Foundation |
117 |
# Distributed under the terms of the GNU General Public License v2 |
118 |
|
119 |
-inherit rpm eutils user |
120 |
+EAPI=6 |
121 |
+ |
122 |
+inherit flag-o-matic rpm toolchain-funcs user |
123 |
|
124 |
MY_P=${P%.*}-${PV##*.} |
125 |
-S=${WORKDIR}/${P%.*} |
126 |
+ |
127 |
DESCRIPTION="App that allows non-privileged apps to write utmp (login) info" |
128 |
HOMEPAGE="https://www.redhat.com/" |
129 |
SRC_URI="mirror://gentoo/${MY_P}.src.rpm" |
130 |
@@ -14,43 +16,43 @@ SLOT="0" |
131 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" |
132 |
IUSE="" |
133 |
|
134 |
-RDEPEND="!sys-libs/libutempter |
135 |
+RDEPEND=" |
136 |
+ !sys-libs/libutempter |
137 |
!dev-python/utmp" |
138 |
|
139 |
+S=${WORKDIR}/${P%.*} |
140 |
+PATCHES=( |
141 |
+ "${FILESDIR}"/${P}-no_utmpx.patch |
142 |
+ "${FILESDIR}"/${P}-fix-build-system.patch |
143 |
+) |
144 |
+ |
145 |
pkg_setup() { |
146 |
enewgroup utmp 406 |
147 |
} |
148 |
|
149 |
-src_unpack() { |
150 |
- rpm_src_unpack |
151 |
- cd "${S}" |
152 |
- epatch "${FILESDIR}"/${P}-soname-makefile-fix.patch |
153 |
- epatch "${FILESDIR}"/${P}-no_utmpx.patch |
154 |
- epatch "${FILESDIR}"/${P}-build.patch |
155 |
-} |
156 |
- |
157 |
-src_compile() { |
158 |
- emake RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" || die |
159 |
+src_configure() { |
160 |
+ tc-export CC |
161 |
+ append-cflags -Wall |
162 |
} |
163 |
|
164 |
src_install() { |
165 |
emake \ |
166 |
- RPM_BUILD_ROOT="${D}" \ |
167 |
+ RPM_BUILD_ROOT="${ED}" \ |
168 |
LIBDIR=/usr/$(get_libdir) \ |
169 |
- install || die |
170 |
- dobin utmp || die |
171 |
+ install |
172 |
+ dobin utmp |
173 |
|
174 |
fowners root:utmp /usr/sbin/utempter |
175 |
fperms 2755 /usr/sbin/utempter |
176 |
} |
177 |
|
178 |
pkg_postinst() { |
179 |
- if [ -f "${ROOT}"/var/log/wtmp ] ; then |
180 |
- chown root:utmp "${ROOT}"/var/log/wtmp |
181 |
- chmod 664 "${ROOT}"/var/log/wtmp |
182 |
+ if [[ -f "${EROOT%/}"/var/log/wtmp ]] ; then |
183 |
+ chown root:utmp "${EROOT%/}"/var/log/wtmp |
184 |
+ chmod 664 "${EROOT%/}"/var/log/wtmp |
185 |
fi |
186 |
- if [ -f "${ROOT}"/var/run/utmp ] ; then |
187 |
- chown root:utmp "${ROOT}"/var/run/utmp |
188 |
- chmod 664 "${ROOT}"/var/run/utmp |
189 |
+ if [[ -f "${EROOT%/}"/var/run/utmp ]] ; then |
190 |
+ chown root:utmp "${EROOT%/}"/var/run/utmp |
191 |
+ chmod 664 "${EROOT%/}"/var/run/utmp |
192 |
fi |
193 |
} |