summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-08-02 12:27:36 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-08-02 13:22:40 +0200
commit06288f7e5d83a795a8ef9feb5cc6a62a5846affc (patch)
tree8dce224bd5c68a548b8764026558984ac827f59e /eclass/opam.eclass
parentdev-ml/textutils: convert to opam.eclass (diff)
downloadgentoo-06288f7e5d83a795a8ef9feb5cc6a62a5846affc.tar.gz
gentoo-06288f7e5d83a795a8ef9feb5cc6a62a5846affc.tar.bz2
gentoo-06288f7e5d83a795a8ef9feb5cc6a62a5846affc.zip
opam.eclass: Allow to override package name
Diffstat (limited to 'eclass/opam.eclass')
-rw-r--r--eclass/opam.eclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 861d6cc2380a..76b2fcbfd53f 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -38,11 +38,12 @@ opam-install() {
}
opam_src_install() {
- opam-install "${PN}"
+ local pkg="${1:-${PN}}"
+ opam-install "${pkg}"
# Handle opam putting doc in a subdir
- if [ -d "${ED}usr/share/doc/${PF}/${PN}" ] ; then
- mv "${ED}usr/share/doc/${PF}/${PN}/"* "${ED}usr/share/doc/${PF}/" || die
- rmdir "${ED}usr/share/doc/${PF}/${PN}" || die
+ if [ -d "${ED}usr/share/doc/${PF}/${pkg}" ] ; then
+ mv "${ED}usr/share/doc/${PF}/${pkg}/"* "${ED}usr/share/doc/${PF}/" || die
+ rmdir "${ED}usr/share/doc/${PF}/${pkg}" || die
fi
}