From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BE46E158094 for ; Wed, 13 Jul 2022 02:31:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B145AE0D7A; Wed, 13 Jul 2022 02:31:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A226E0D7A for ; Wed, 13 Jul 2022 02:31:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77A063410FE for ; Wed, 13 Jul 2022 02:31:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 93578540 for ; Wed, 13 Jul 2022 02:31:21 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1657679183.6b49a5cb3c68c86754c229e5baa19c89fbe19e11.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 6b49a5cb3c68c86754c229e5baa19c89fbe19e11 X-VCS-Branch: dev Date: Wed, 13 Jul 2022 02:31:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 36ee3114-6a7b-4474-ae7f-04f2e877b23f X-Archives-Hash: bf1fc76dfe087d798e11a4529301a1bd commit: 6b49a5cb3c68c86754c229e5baa19c89fbe19e11 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Wed Jul 13 02:26:23 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Wed Jul 13 02:26:23 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b49a5cb R-packages.eclass: src_install improvements Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/R-packages.eclass | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index a9a275a22..08d472a59 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -134,42 +134,44 @@ R-packages_src_compile() { # @FUNCTION: R-packages_src_install # @DESCRIPTION: -# function to move the files in the right folders -# documentation and examples to docsdir, symlinked back to R site-library (to allow access from within R) -# everything else to R site-library +# Move files into right folders. +# +# Documentation and examples is moved to docdir, symlinked back to R +# site-library (to allow access from within R). +# +# Everything else is moved to the R site-library. R-packages_src_install() { - pushd "${T}/R/${CRAN_PN}" || die + cd "${T}"/R/${CRAN_PN} || die - local DOCS_DIR="/usr/share/doc/${PF}" + local DOCDIR="/usr/share/doc/${PF}" + local EDOCDIR="${ED}${DOCDIR}" + mkdir -p "${EDOCDIR}" || die - mkdir -p "${ED}/${DOCS_DIR}" || die - - for i in NEWS.md README.md DESCRIPTION examples CITATION INDEX NEWS WORDLIST News.Rd ; do - _movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die - docompress -x "${DOCS_DIR}/${i}" + for i in {NEWS,README}.md DESCRIPTION CITATION INDEX NEWS WORDLIST News.Rd; do + _movelink "${i}" "${EDOCDIR}/${i}" done if [[ -e html ]]; then - _movelink html "${ED}${DOCS_DIR}/html" || die - docompress -x "${DOCS_DIR}/html" + _movelink html "${EDOCDIR}"/html + fi + + if [[ -e examples ]]; then + _movelink examples "${EDOCDIR}"/examples + docompress -x "${DOCDIR}"/examples fi + if [[ -e doc ]]; then pushd doc || die - for i in * ; do - _movelink "${i}" "${ED}${DOCS_DIR}/${i}" || die - docompress -x "${DOCS_DIR}/${i}" + for i in *; do + _movelink "${i}" "${EDOCDIR}/${i}" done popd || die fi - if [[ -e doc/html ]]; then - docompress -x "${DOCS_DIR}/html" - fi - docompress -x "${DOCS_DIR}" rm -rf tests test || die - insinto "/usr/$(get_libdir)/R/site-library" - doins -r "${T}/R/${CRAN_PN}" + insinto /usr/$(get_libdir)/R/site-library + doins -r "${T}"/R/${CRAN_PN} } # @FUNCTION: R-packages_pkg_postinst