On 01/12/2013 01:46 AM, Pacho Ramos wrote: > El mié, 09-01-2013 a las 12:04 -0800, Zac Medico escribió: >> On 01/09/2013 11:53 AM, Pacho Ramos wrote: >>> This changes the name of eclass to readme.gentoo.eclass and gets >>> information from ${FILESDIR}/README.gentoo >> >> What if there are multiple versions/slots that have different >> README.gentoo content? Maybe the eclass should accommodate that somehow? > > This should work, it will read DOC_CONTENTS variable from ebuild and, if > not set, rely on common ${FILESDIR}/README.gentoo
You might add a loop to search for a version-specific README.gentoo, like this: file= for suffix in -${PV} -${PV}-${PR} "" ; do [[ -f ${FILESDIR}/README.gentoo${suffix} ]] && \ file=${FILESDIR}/README.gentoo${suffix} && break done if [[ ${file} ]] ; then cp "${file}" "${T}"/README.gentoo dodoc "${T}"/README.gentoo fi -- Thanks, Zac