1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 # Upstream is still using strange version numbers
9 MY_PV="007.1211.0000.0000"
11 DESCRIPTION="MegaRAID StorCLI (successor of the MegaCLI)"
12 HOMEPAGE="https://www.broadcom.com/support/download-search?dk=storcli"
13 SRC_URI="https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/${MY_PV}_Unified_StorCLI.zip -> ${P}.zip"
15 LICENSE="Avago LSI BSD"
17 KEYWORDS="-* ~amd64 ~x86"
21 DEPEND="app-arch/unzip"
23 MY_STORCLI_BASEDIR="/opt/lsi/storcli"
25 QA_PRESTRIPPED="${MY_STORCLI_BASEDIR:1}/storcli
26 ${MY_STORCLI_BASEDIR:1}/storcli32"
27 QA_PREBUILT=${QA_PRESTRIPPED}
31 pushd srcfiles &>/dev/null || die
33 mv Unified_storcli_all_os/Ubuntu/storcli_*.deb "${WORKDIR}" || die "Failed to move storcli_*.deb"
34 popd &>/dev/null || die
36 rm -rf srcfiles || die
38 # Unpack Ubuntu package which will be our $S content
39 unpack "${WORKDIR}"/storcli_*.deb
40 rm -f storcli_*.deb || die "Failed to cleanup storcli_*.deb package"
41 unpack "${WORKDIR}"/data.tar.xz
43 mkdir "${S}" || die "Failed to create '${S}'"
50 mv "${WORKDIR}"/opt/Mega*/storcli/* "${S}" || die "Failed to move storcli_.deb content to '${S}'"
51 rm -rf "${WORKDIR}"/{opt,control.tar.gz,data.tar.gz,debian-binary} || die "Failed to cleanup no longer needed files"
55 exeinto "${MY_STORCLI_BASEDIR}"
60 # 32-bit version is less crashy than the 64bit (bug #656494)
61 newexe storcli storcli32
62 newexe storcli64 storcli
65 dosym "${MY_STORCLI_BASEDIR}"/storcli /usr/sbin/storcli
67 pax-mark m "${D}${MY_STORCLI_BASEDIR}"/storcli