commit: 00a1865827862c17a4019d56afb4b5b5f8a3f658
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 16:55:09 2018 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 16:55:09 2018 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=00a18658
Bring rpm example up to EAPI 6 standards
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
.../functions/src_unpack/rpm-sources/text.xml | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
index 64ac1de..584866a 100644
--- a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
+++ b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
@@ -19,7 +19,7 @@ that will unpack the RPM files.
</p>
<p>
-If you do need to apply patches then override <c>src_unpack</c> in a
+If you do need to call additional unpack functions then override
<c>src_unpack</c> in a
manner such as:
</p>
@@ -55,9 +55,11 @@ patches. The filename should be
<c>suse-fetchmail-6.2.5.54.1.ebuild</c>.
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-inherit eutils versionator rpm
+EAPI="6"
-MY_PV=$(replace_version_separator 3 '-')
+inherit eapi7-ver rpm
+
+MY_PV=$(ver_rs 3 '-')
MY_P=fetchmail-${MY_PV}
SRC_URI="https://suse.osuosl.org/suse/i386/9.2/suse/src/${MY_P}.src.rpm"
@@ -80,13 +82,17 @@ RESTRICT="mirror"
#USE_RPMOFFSET_ONLY=1
-S=${WORKDIR}/fetchmail-$(get_version_component_range 1-3)
+S=${WORKDIR}/fetchmail-$(ver_cut 1-3)
src_unpack () {
- rpm_src_unpack ${A}
- cd "${S}"
- EPATCH_SOURCE="${WORKDIR}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
+ rpm_src_unpack ${A}
+}
+
+src_prepare () {
+ for i in "${WORKDIR}"/*.patch ; do
+ eapply "${i}"
+ done
+ eapply_user
}
</codesample>