megacli-8.07.10.ebuild 2.0 KB

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