Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: Pacho Ramos <pacho@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] About using a CONFIGURATION (or SETUP) file under /usr/share/doc for configuration information
Date: Sat, 12 Jan 2013 10:01:53
Message-Id: 50F1345F.9080302@gentoo.org
In Reply to: Re: [gentoo-dev] About using a CONFIGURATION (or SETUP) file under /usr/share/doc for configuration information by Pacho Ramos
1 On 01/12/2013 01:46 AM, Pacho Ramos wrote:
2 > El mié, 09-01-2013 a las 12:04 -0800, Zac Medico escribió:
3 >> On 01/09/2013 11:53 AM, Pacho Ramos wrote:
4 >>> This changes the name of eclass to readme.gentoo.eclass and gets
5 >>> information from ${FILESDIR}/README.gentoo
6 >>
7 >> What if there are multiple versions/slots that have different
8 >> README.gentoo content? Maybe the eclass should accommodate that somehow?
9 >
10 > This should work, it will read DOC_CONTENTS variable from ebuild and, if
11 > not set, rely on common ${FILESDIR}/README.gentoo
12
13 You might add a loop to search for a version-specific README.gentoo,
14 like this:
15
16 file=
17 for suffix in -${PV} -${PV}-${PR} "" ; do
18 [[ -f ${FILESDIR}/README.gentoo${suffix} ]] && \
19 file=${FILESDIR}/README.gentoo${suffix} && break
20 done
21 if [[ ${file} ]] ; then
22 cp "${file}" "${T}"/README.gentoo
23 dodoc "${T}"/README.gentoo
24 fi
25
26 --
27 Thanks,
28 Zac

Replies