🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.gentoo.dev
Article #204

[gentoo-dev] [PATCH 2/3] dune.eclass: use --docdir for dune install

#204
From: Thomas Bracht Laumann Jespersen
Date: Thu, 19 Nov 2026 12:40
36 lines
2953 bytes
Instead of manually moving files from /usr/doc to /usr/share/doc/${PF},
use the --docdir argument for "dune install". This ensure the generated
dune-package file will reference the correct location of installed docs.

Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
---
 eclass/dune.eclass | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index 2bb6d4c3d2a3..98c508ee43ff 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -170,18 +170,12 @@ dune-install() {
 		--prefix="${EPREFIX}/usr"
 		--libdir="$(ocamlc -where)"
 		--mandir="${EPREFIX}/usr/share/man"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
 	)
 
 	local pkg
 	for pkg in "${pkgs[@]}" ; do
 		edune install ${myduneopts[@]} ${pkg}
-
-		# Move docs to the appropriate place.
-		if [[ -d "${ED}/usr/doc/${pkg}" ]] ; then
-			mkdir -p "${ED}/usr/share/doc/${PF}/" || die
-			mv "${ED}/usr/doc/${pkg}" "${ED}/usr/share/doc/${PF}/" || die
-			rm -rf "${ED}/usr/doc" || die
-		fi
 	done
 }
 

-- 
2.56.1
Technical Details
Message-ID: <O19AJ-cT6p-21@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <O19AJ-cT6p-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
Newsgroups: linux.gentoo.dev
Subject: [gentoo-dev] [PATCH 2/3] dune.eclass: use --docdir for dune install
Date: Thu, 19 Nov 2026 13:40:01 +0100
Message-ID: <O19AJ-cT6p-21@gated-at.bofh.it>
References: <O19AJ-cT6p-5@gated-at.bofh.it>
X-Original-To: gentoo-dev@lists.gentoo.org
List-ID: Gentoo Linux mail <gentoo-dev.gentoo.org>
Reply-To: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: b4 0.16.0
X-Developer-Signature: v=1; a=openpgp-sha256; l=1091; i=laumann@gentoo.org;
 h=from:subject:message-id; bh=Syltn7lFjyPXeFI84fYtubTBxoLEjnbP7zFoPeux1B8=;
 b=owGbwMvMwCWm/LstS/zLCmvG02pJDFn/3qivYxRxvr6n5G76NtH0DQIHpS5LzeG74fqjkK2Lj
 09v5jmRjo8sDGJcDDPFFFlWb1nZddFa/ATzQcZ9MHNYmUCGSIs0MAABCwNfbmJeqZGOkZ6ptqGe
 IZChYxQPkdNj0MgsLi5NLdJNKyhyyMsvSSzJzM8r1ssvSM0rSC/QS8tMK8nIyC8qTgUaoZeXWuL
 o5GTiaGnh6GJo7GRo7mxhYOxsaGDo5Gpk7OZkYWbmaGjuZuJoYezEwMUpAHPNk+UM/x3nqDG7p0
 5a0W3wqza4//NB70oW1osB/oHHdtcL8Sl2LGRkuDj3eP+rNGuL+Gvtq05s5OMTnbXKwfBIjMLON
 63auQv3cQEA
X-Developer-Key: i=laumann@gentoo.org; a=openpgp;
 fpr=94DC1AEB62B1E0B4FDC5DC3A85C9FB9C4405C282
Approved: robomod@news.nic.it
Lines: 36
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
X-Original-Date: Thu, 19 Nov 2026 13:31:21 +0100
X-Original-Message-ID: <20261119-dune-eclass-install-v1-2-0c6b81eca2b1@gentoo.org>
X-Original-References: <20261119-dune-eclass-install-v1-0-0c6b81eca2b1@gentoo.org>