dev-python/mpmath: Bump to 1.4.0_alpha4
[gentoo/gentoo.git] / sys-block / sas3ircu / sas3ircu-16-r2.ebuild
blob19b627edc3622b89893e52e2fe3978c312253444
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 MY_P="${PN^^}_P${PV}"
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"
16 SRC_URI="
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}"
23 LICENSE="LSI"
24 SLOT="0"
25 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~x64-solaris"
26 IUSE="doc uefi"
27 RESTRICT="strip fetch mirror"
29 BDEPEND="app-arch/unzip"
31 QA_PREBUILT="opt/lsi/sas3ircu boot/efi/sas3ircu.efi"
33 pkg_pretend() {
34         use uefi && mount-boot_pkg_pretend
37 pkg_nofetch() {
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"
42         if use doc; then
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"
45         fi
46         einfo "${SRC_URI}"
49 pkg_setup() {
50         use uefi && secureboot_pkg_setup
53 supportedcards() {
54         elog "This binary supports should support ALL cards, including, but not"
55         elog "limited to the following series:"
56         elog ""
57         elog "LSI SAS 3004"
58         elog "LSI SAS 3008"
59         elog "LSI SAS 3108"
60         elog "LSI SAS 3116"
61         elog "LSI SAS 3208"
62         elog "LSI SAS 3308"
65 src_install() {
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}" )
70         default
72         local ARCH
73         use amd64 && ARCH="x64"
74         use arm64 && ARCH="arm"
75         use ppc64 && ARCH="ppc64"
76         use x64-solaris && ARCH="solaris_x86"
77         use x86 && ARCH="x86"
79         exeinto /opt/lsi/
80         doexe sas3ircu_rel/sas3ircu/sas3ircu_linux_"${ARCH}"_rel/sas3ircu
82         if use uefi; then
83                 if use amd64 || use arm64; then
84                         exeinto /boot/efi/
85                         doexe sas3ircu_rel/sas3ircu/sas3ircu_udk_uefi_"${ARCH}"_rel/sas3ircu.efi
86                         secureboot_auto_sign --in-place
87                 fi
88         fi
90         dodir /opt/bin
91         dosym ../lsi/sas3ircu /opt/bin/sas3ircu
94 pkg_preinst() {
95         use uefi && mount-boot_pkg_preinst
98 pkg_prerm() {
99         use uefi && mount-boot_pkg_prerm