Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/megacli/
Date: Thu, 24 Sep 2020 19:31:42
Message-Id: 1600975054.8040a5a77fb1f690fe39652316df8c14b27c429f.robbat2@gentoo
1 commit: 8040a5a77fb1f690fe39652316df8c14b27c429f
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 24 19:17:34 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 24 19:17:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8040a5a7
7
8 sys-block/megacli: bump for EAPI7
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 sys-block/megacli/megacli-8.07.14-r3.ebuild | 80 +++++++++++++++++++++++++++++
13 1 file changed, 80 insertions(+)
14
15 diff --git a/sys-block/megacli/megacli-8.07.14-r3.ebuild b/sys-block/megacli/megacli-8.07.14-r3.ebuild
16 new file mode 100644
17 index 00000000000..ed3a7f8c02d
18 --- /dev/null
19 +++ b/sys-block/megacli/megacli-8.07.14-r3.ebuild
20 @@ -0,0 +1,80 @@
21 +# Copyright 1999-2020 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +inherit rpm
27 +MY_PV="${PV//./-}"
28 +MY_P=${MY_PV}_MegaCLI
29 +
30 +DESCRIPTION="LSI Logic MegaRAID Command Line Interface management tool"
31 +HOMEPAGE="https://www.broadcom.com/support/knowledgebase/1211161498596/megacli-cheat-sheet--live-examples https://www.broadcom.com/support/knowledgebase/1211161496959/megacli-commands"
32 +# This file is '[zip] MegaCLI 5.5 P2', Date: 01/20/2014 Size: 7753 KB
33 +SRC_URI="https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/${MY_P}.zip"
34 +
35 +LICENSE="LSI"
36 +SLOT="0"
37 +# This package can never enter stable, it can't be mirrored and upstream
38 +# can remove the distfiles from their mirror anytime.
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE=""
41 +
42 +DEPEND="app-arch/unzip
43 + app-admin/chrpath"
44 +RDEPEND="sys-libs/ncurses-compat:5"
45 +
46 +S=${WORKDIR}
47 +
48 +# Previous releases from LSI directly required a click-through EULA; but the
49 +# upstream website no longer requires this consistently: most old files have
50 +# two or more download pages, and while one of the pages has a generic
51 +# click-through download form, the file-specific download page only requires
52 +# click-through on some items. See also sys-block/lsiutil
53 +RESTRICT="mirror bindist"
54 +QA_PREBUILT="/opt/${PN}/${PN}
55 + /opt/${PN}/lib/*"
56 +
57 +src_unpack() {
58 + unpack ${A}
59 + cd "${S}"
60 + rpm_unpack ./Linux/MegaCli-${PV}-1.noarch.rpm
61 +}
62 +
63 +src_install() {
64 + newdoc "${PV}_MegaCLI.txt" RELEASE.txt
65 +
66 + exeinto /opt/megacli
67 + libsysfs=libstorelibir-2.so.14.07-0
68 + case ${ARCH} in
69 + amd64) MegaCli=MegaCli64;;
70 + x86) MegaCli=MegaCli;;
71 + *) die "invalid ARCH";;
72 + esac
73 + newexe opt/MegaRAID/MegaCli/${MegaCli} ${PN}
74 +
75 + exeinto /opt/${PN}/lib
76 + doexe opt/MegaRAID/MegaCli/${libsysfs}
77 +
78 + into /opt
79 + newbin "${FILESDIR}"/${PN}-wrapper ${PN}
80 + dosym ${PN} /opt/bin/MegaCli
81 +
82 + # Remove DT_RPATH
83 + chrpath -d "${D}"/opt/${PN}/${PN}
84 +}
85 +
86 +pkg_postinst() {
87 + einfo
88 + einfo "See /usr/share/doc/${PF}/RELEASE.txt for a list of supported controllers"
89 + einfo "(contains LSI model names only, not those sold by 3rd parties"
90 + einfo "under custom names like Dell PERC etc)."
91 + einfo
92 + einfo "As there's no dedicated manual, you might want to have"
93 + einfo "a look at the following cheat sheet (originally written"
94 + einfo "for Dell PowerEdge Expandable RAID Controllers):"
95 + einfo "http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"
96 + einfo
97 + einfo "For more information about working with Dell PERCs see:"
98 + einfo "http://tools.rapidsoft.de/perc/"
99 + einfo
100 +}