Gentoo Archives: gentoo-commits

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