1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DISTFILE_BIN="${MY_P}.zip"
9 DISTFILE_DOC="SAS3_IR_UG.pdf"
10 SRC_URI_BASE="https://docs.broadcom.com/docs-and-downloads/host-bus-adapters"
12 inherit mount-boot secureboot
14 DESCRIPTION="LSI MPT-SAS3 controller management tool"
15 HOMEPAGE="https://www.broadcom.com/products/storage/host-bus-adapters/sas-9300-8e#downloads"
17 ${SRC_URI_BASE}/host-bus-adapters-common-files/sas_sata_12g_p${PV}/${DISTFILE_BIN}
18 https://docs.broadcom.com/docs/${DISTFILE_BIN}
19 doc? ( "${SRC_URI_BASE}/${DISTFILE_DOC}" )
21 S="${WORKDIR}/${MY_P}"
25 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~x64-solaris"
27 RESTRICT="strip fetch mirror"
29 BDEPEND="app-arch/unzip"
31 QA_PREBUILT="opt/lsi/sas3ircu boot/efi/sas3ircu.efi"
34 use uefi && mount-boot_pkg_pretend
38 elog "Broadcom has a mandatory click-through license on their binaries."
39 elog "Please visit ${HOMEPAGE} and download ${DISTFILE_BIN} from the Mangement Software section."
40 elog "If the file has been moved again, the license form might be available at https://docs.broadcom.com/docs/${DISTFILE_BIN}"
41 elog "After downloading, move ${MY_P} into your DISTDIR directory"
43 elog "Please also download 'SAS-3 Integrated RAID Configuration Utility User Guide' (${DISTFILE_DOC}) "
44 elog "and also place it into your DISTDIR directory"
50 use uefi && secureboot_pkg_setup
54 elog "This binary supports should support ALL cards, including, but not"
55 elog "limited to the following series:"
66 # The second number is some sort of internal revision that is inconsistent between releases.
67 local DOCS=( IRCU_MPT_GEN3_Phase"${PV}".0-*.pdf "README_SAS3IRCU_P${PV}.txt" )
68 use doc && DOCS+=( "${DISTDIR}/${DISTFILE_DOC}" )
73 use amd64 && ARCH="x64"
74 use arm64 && ARCH="arm"
75 use ppc64 && ARCH="ppc64"
76 use x64-solaris && ARCH="solaris_x86"
80 doexe sas3ircu_rel/sas3ircu/sas3ircu_linux_"${ARCH}"_rel/sas3ircu
83 if use amd64 || use arm64; then
85 doexe sas3ircu_rel/sas3ircu/sas3ircu_udk_uefi_"${ARCH}"_rel/sas3ircu.efi
86 secureboot_auto_sign --in-place
91 dosym ../lsi/sas3ircu /opt/bin/sas3ircu
95 use uefi && mount-boot_pkg_preinst
99 use uefi && mount-boot_pkg_prerm