diff options
Diffstat (limited to 'ebuild-writing/functions/src_unpack/rpm-sources/text.xml')
-rw-r--r-- | ebuild-writing/functions/src_unpack/rpm-sources/text.xml | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml index dcf9113..5d3a6be 100644 --- a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml +++ b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml @@ -1,4 +1,4 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <guide self="ebuild-writing/functions/src_unpack/rpm-sources/"> <chapter> <title>RPM Sources</title> @@ -19,16 +19,16 @@ 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> <codesample lang="ebuild"> -src_unpack () { - rpm_src_unpack ${A} - cd "${S}" +src_unpack() { + rpm_src_unpack ${A} + cd "${S}" - use ssl && epatch "${FILESDIR}/${PV}/${P}-ssl.patch" + use ssl && eapply "${FILESDIR}/${PV}/${P}-ssl.patch" } </codesample> @@ -52,18 +52,20 @@ patches. The filename should be <c>suse-fetchmail-6.2.5.54.1.ebuild</c>. </p> <codesample lang="ebuild"> -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# $Header: $ -inherit eutils versionator rpm +EAPI=7 + +inherit rpm -MY_PV=$(replace_version_separator 3 '-') +MY_PV=$(ver_rs 3 '-') MY_P=fetchmail-${MY_PV} -SRC_URI="http://suse.osuosl.org/suse/i386/9.2/suse/src/${MY_P}.src.rpm" DESCRIPTION="SuSE 9.2 Fetchmail Source Package" -HOMEPAGE="http://www.suse.com" +HOMEPAGE="https://www.suse.com" +SRC_URI="https://suse.osuosl.org/suse/i386/9.2/suse/src/${MY_P}.src.rpm" +S=${WORKDIR}/fetchmail-$(ver_cut 1-3) LICENSE="GPL-2 public-domain" SLOT="0" @@ -74,20 +76,22 @@ RESTRICT="mirror" # Need to test if the file can be unpacked with rpmoffset and cpio # If it can't then set: -#DEPEND="app-arch/rpm" +#BDEPEND="app-arch/rpm" # To force the use of rpmoffset and cpio instead of rpm2cpio from # app-arch/rpm, then set the following: #USE_RPMOFFSET_ONLY=1 -S=${WORKDIR}/fetchmail-$(get_version_component_range 1-3) - -src_unpack () { +src_unpack() { rpm_src_unpack ${A} - cd "${S}" - EPATCH_SOURCE="${WORKDIR}" EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" epatch +} + +src_prepare() { + for i in "${WORKDIR}"/*.patch ; do + eapply "${i}" + done + eapply_user } </codesample> |