1 |
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=6
|
|
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
inherit pax-utils rpm versionator
|
|
6 |
inherit rpm
|
7 |
7 |
|
8 |
|
MY_PV=$(replace_version_separator 2 '-')
|
|
8 |
MY_PV=$(ver_rs 2 '-')
|
9 |
9 |
|
10 |
10 |
DESCRIPTION="HPE Smart Storage Administrator (HPE SSA) CLI (HPSSACLI, formerly HPACUCLI)"
|
11 |
|
HOMEPAGE="https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_688838b13b194c7abe1aa98584"
|
12 |
|
SRC_URI="https://downloads.linux.hpe.com/SDR/repo/spp/2019.03.0/packages/ssacli-${MY_PV}.x86_64.rpm"
|
|
11 |
HOMEPAGE="https://support.hpe.com/hpesc/public/swd/detail?swItemId=MTX_8484363847dd4e5ca2970188b7"
|
|
12 |
SRC_URI="https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1857046646/v183344/ssacli-${MY_PV}.x86_64.rpm"
|
13 |
13 |
|
14 |
|
LICENSE="hpe"
|
|
14 |
LICENSE="hp-proliant-essentials"
|
15 |
15 |
SLOT="0"
|
16 |
16 |
KEYWORDS="-* amd64"
|
17 |
|
IUSE=""
|
18 |
17 |
|
19 |
|
DEPEND=""
|
20 |
|
RDEPEND="
|
21 |
|
elibc_glibc? ( sys-libs/glibc )
|
22 |
|
sys-libs/libunwind
|
23 |
|
sys-process/procps"
|
24 |
|
|
25 |
|
DOCS=( license.txt readme.txt )
|
26 |
|
|
27 |
|
MY_HPSSACLI_BASEDIR="/opt/hp/hpssacli"
|
28 |
|
|
29 |
|
QA_PREBUILT="${MY_HPSSACLI_BASEDIR:1}/hpssa*.bin"
|
30 |
|
QA_EXECSTACK="${MY_HPSSACLI_BASEDIR:1}/hpssa*.bin"
|
31 |
|
|
32 |
|
src_unpack() {
|
33 |
|
rpm_src_unpack
|
34 |
|
|
35 |
|
mkdir "${S}" || die "Failed to create '${S}'"
|
36 |
|
}
|
37 |
|
|
38 |
|
src_prepare() {
|
39 |
|
default
|
40 |
|
|
41 |
|
# Create a clean $S
|
42 |
|
mv "${WORKDIR}"/opt/smartstorageadmin/ssacli/bin/ssa* "${S}" || die "Failed to to copy 'ssa*' related files"
|
43 |
|
mv "${S}"/ssacli "${S}"/hpssacli || die "Renaming ssacli failed!"
|
44 |
|
mv "${S}"/ssascripting "${S}"/hpssascripting || die "Renaming ssascripting failed!"
|
45 |
|
mv "${S}"/ssacli.license "${S}"/license.txt || die "Renaming ssacli.license failed!"
|
46 |
|
mv "${S}"/ssacli*.txt "${S}"/readme.txt || die "Renaming ssacli*.txt failed!"
|
47 |
|
rm -r "${WORKDIR}"/opt || die "Failed to cleanup '${WORKDIR}/opt'"
|
48 |
|
rm -r "${WORKDIR}"/usr || die "Failed to cleanup '${WORKDIR}/usr'"
|
49 |
|
}
|
|
18 |
S="${WORKDIR}"
|
50 |
19 |
|
51 |
20 |
src_install() {
|
52 |
|
newsbin "${FILESDIR}"/"${PN}-wrapper" ${PN}
|
53 |
|
dosym ${PN} /usr/sbin/hpssascripting
|
|
21 |
local -r ssacli_bindir="opt/smartstorageadmin/ssacli/bin"
|
54 |
22 |
|
55 |
|
exeinto "${MY_HPSSACLI_BASEDIR}"
|
56 |
|
for bin in "${S}"/hpssa{cli,scripting}; do
|
57 |
|
local basename=$(basename "${bin}")
|
58 |
|
newexe "${bin}" ${basename}.bin
|
59 |
|
done
|
|
23 |
dosbin "${ssacli_bindir}"/ssacli
|
|
24 |
dosbin "${ssacli_bindir}"/ssascripting
|
|
25 |
dosbin "${ssacli_bindir}"/rmstr
|
60 |
26 |
|
61 |
|
dodoc "${DOCS[@]}"
|
|
27 |
dodoc "${ssacli_bindir}/ssacli-${MY_PV}.x86_64.txt"
|
62 |
28 |
|
63 |
|
pax-mark m "${D%/}${HPSSACLI_BASEDIR}"/*.bin
|
|
29 |
gunzip usr/man/man8/ssacli.8.gz || die
|
|
30 |
doman usr/man/man8/ssacli.8
|
64 |
31 |
}
|