diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-08-02 12:27:36 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-08-02 13:22:40 +0200 |
commit | 06288f7e5d83a795a8ef9feb5cc6a62a5846affc (patch) | |
tree | 8dce224bd5c68a548b8764026558984ac827f59e /eclass/opam.eclass | |
parent | dev-ml/textutils: convert to opam.eclass (diff) | |
download | gentoo-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.eclass | 9 |
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 } |