sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / sys-block / megacli / megacli-8.07.10.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit rpm
7 MY_P=${PV}_MegaCLI_Linux
8
9 DESCRIPTION="LSI Logic MegaRAID Command Line Interface management tool"
10 HOMEPAGE="http://www.lsi.com/"
11 SRC_URI="http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/${MY_P}.zip"
12
13 LICENSE="LSI"
14 SLOT="0"
15 # This package can never enter stable, it can't be mirrored and upstream
16 # can remove the distfiles from their mirror anytime.
17 KEYWORDS="amd64 x86"
18 IUSE=""
19
20 DEPEND="app-arch/unzip
21         app-admin/chrpath"
22 RDEPEND="sys-libs/ncurses-compat:5"
23
24 S=${WORKDIR}/${MY_P}
25
26 RESTRICT="mirror fetch"
27 QA_PREBUILT="/opt/${PN}/${PN}
28         /opt/${PN}/lib/*"
29
30 pkg_nofetch() {
31         einfo "Upstream has implement a mandatory clickthrough EULA for distfile download"
32         einfo "Please visit $SRC_URI"
33         einfo "And place $A into your DISTDIR directory"
34 }
35
36 src_unpack() {
37         unpack ${A}
38         cd "${S}"
39         rpm_unpack ./"Linux MegaCLI ${PV}"/MegaCli-${PV}-1.noarch.rpm
40 }
41
42 src_install() {
43         newdoc "Linux MegaCLI ${PV}.txt" RELEASE.txt
44
45         exeinto /opt/megacli
46         libsysfs=libstorelibir-2.so.14.07-0
47         case ${ARCH} in
48                 amd64) MegaCli=MegaCli64;;
49                 x86) MegaCli=MegaCli;;
50                 *) die "invalid ARCH";;
51         esac
52         newexe opt/MegaRAID/MegaCli/${MegaCli} ${PN}
53
54         exeinto /opt/${PN}/lib
55         doexe opt/MegaRAID/MegaCli/${libsysfs}
56
57         into /opt
58         newbin "${FILESDIR}"/${PN}-wrapper ${PN}
59         dosym ${PN} /opt/bin/MegaCli
60
61         # Remove DT_RPATH
62         chrpath -d "${D}"/opt/${PN}/${PN}
63 }
64
65 pkg_postinst() {
66         einfo
67         einfo "See /usr/share/doc/${PF}/RELEASE.txt for a list of supported controllers"
68         einfo "(contains LSI model names only, not those sold by 3rd parties"
69         einfo "under custom names like Dell PERC etc)."
70         einfo
71         einfo "As there's no dedicated manual, you might want to have"
72         einfo "a look at the following cheat sheet (originally written"
73         einfo "for Dell PowerEdge Expandable RAID Controllers):"
74         einfo "http://tools.rapidsoft.de/perc/perc-cheat-sheet.html"
75         einfo
76         einfo "For more information about working with Dell PERCs see:"
77         einfo "http://tools.rapidsoft.de/perc/"
78         einfo
79 }