aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/linux-megacli
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-12-01 23:26:24 +0800
committerpav <pav@FreeBSD.org>2006-12-01 23:26:24 +0800
commit6b24b1c3fa612875f5b52a66c98fd7ad6f0da6ff (patch)
treead81d5bdc7ae173c15ae1f1d43a95353dbbd0240 /sysutils/linux-megacli
parentac31231d0490be752a854ea3e343b7f4ded0e2d1 (diff)
downloadfreebsd-ports-gnome-6b24b1c3fa612875f5b52a66c98fd7ad6f0da6ff.tar.gz
freebsd-ports-gnome-6b24b1c3fa612875f5b52a66c98fd7ad6f0da6ff.tar.zst
freebsd-ports-gnome-6b24b1c3fa612875f5b52a66c98fd7ad6f0da6ff.zip
LSI Logic MegaRAID SAS MegaCLI Release
This is the Linux console based management utility for the LSI MegaRAID SAS family of controllers. FreeBSD >= 6.1 supports running this tool by the means of the mfi_linux.ko kernel module and the /dev/mfi0 device. Author: LSI Logic Corporation WWW: http://www.lsi.com/ PR: ports/106012 Submitted by: Ruben van Staveren <ruben@verweg.com>
Diffstat (limited to 'sysutils/linux-megacli')
-rw-r--r--sysutils/linux-megacli/Makefile52
-rw-r--r--sysutils/linux-megacli/distinfo3
-rw-r--r--sysutils/linux-megacli/files/megacli.sh.in34
-rw-r--r--sysutils/linux-megacli/pkg-descr10
-rw-r--r--sysutils/linux-megacli/pkg-message30
-rw-r--r--sysutils/linux-megacli/pkg-plist4
6 files changed, 133 insertions, 0 deletions
diff --git a/sysutils/linux-megacli/Makefile b/sysutils/linux-megacli/Makefile
new file mode 100644
index 000000000000..605658e42ecb
--- /dev/null
+++ b/sysutils/linux-megacli/Makefile
@@ -0,0 +1,52 @@
+# Ports collection makefile for: linux-megacli
+# Date created: Wed, Nov 29th, 2006
+# Whom: Ruben van Staveren (ruben@verweg.com)
+#
+# $FreeBSD$
+#
+
+PORTNAME= megacli
+PORTVERSION= 1.01.09
+CATEGORIES= sysutils linux
+MASTER_SITES= http://lsi.com/files/support/rsa/MR_SAS_1.0/
+PKGNAMEPREFIX= linux-
+DISTNAME= Linux_MegaCli_${PORTVERSION}
+
+MAINTAINER= ruben@verweg.com
+COMMENT= LSI MegaRAID SAS controller management utility
+
+NO_WRKSUBDIR= yes
+USE_ZIP= yes
+RESTRICTED= Redistribution prohibited, see: http://lsi.com/cm/License.do
+ONLY_FOR_ARCHS= i386 amd64
+USE_LINUX= yes
+SUB_FILES= megacli.sh
+
+# From bsd.linux.rpm.mk
+RPM2CPIO?= ${LOCALBASE}/bin/rpm2cpio
+EXTRACT_DEPENDS+= ${RPM2CPIO}:${PORTSDIR}/archivers/rpm
+
+do-build:
+ @cd ${WRKSRC} && \
+ ${UNZIP_CMD} MegaCliLin.zip && \
+ ${RPM2CPIO} MegaCli-${PORTVERSION}-0.i386.rpm | ${CPIO} -id --quiet
+ @${BRANDELF} -t Linux ${WRKSRC}/usr/sbin/MegaCli
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/megacli.sh ${PREFIX}/sbin/megacli
+ ${INSTALL_PROGRAM} ${WRKSRC}/usr/sbin/MegaCli ${PREFIX}/libexec
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/Read-me.txt ${DOCSDIR}/readme.txt
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 602000
+IGNORE= needs at least FreeBSD 6.2 and mfi_linux.ko
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/linux-megacli/distinfo b/sysutils/linux-megacli/distinfo
new file mode 100644
index 000000000000..2eceac33ef6b
--- /dev/null
+++ b/sysutils/linux-megacli/distinfo
@@ -0,0 +1,3 @@
+MD5 (Linux_MegaCli_1.01.09.zip) = 819808210ba2233432386b00fdfe138d
+SHA256 (Linux_MegaCli_1.01.09.zip) = b0a8a6f15338ecc36cb15f5da876722ff8d7e2fddc3b820fb2231afee2f95f48
+SIZE (Linux_MegaCli_1.01.09.zip) = 576961
diff --git a/sysutils/linux-megacli/files/megacli.sh.in b/sysutils/linux-megacli/files/megacli.sh.in
new file mode 100644
index 000000000000..51aa7aba9b29
--- /dev/null
+++ b/sysutils/linux-megacli/files/megacli.sh.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# check for root user
+#
+if [ `id -u` -ne 0 ]
+then
+ echo You must be root to run `basename $0`.
+ exit 1
+fi
+
+if ! [ `sysctl -n compat.linux.osrelease` = "2.6.12" ]; then
+ echo You need to set compat.linux.osrelease to 2.6.12 to run `basename $0`.
+ exit 1
+fi
+
+if ! [ -d /usr/compat/linux/sys ]; then
+ echo You need to mount linsysfs to run `basename $0`.
+ exit 1
+fi
+
+# check for active mfi_linux.ko
+#
+if ! kldstat -q -m mfi_linux
+then
+ if kldload mfi_linux
+ then
+ echo 'mfi_linux module loaded.'
+ else
+ echo 'mfi_linux module failed to load.'
+ exit 1
+ fi
+fi
+
+exec %%PREFIX%%/libexec/MegaCli ${*}
diff --git a/sysutils/linux-megacli/pkg-descr b/sysutils/linux-megacli/pkg-descr
new file mode 100644
index 000000000000..b6c873ae443a
--- /dev/null
+++ b/sysutils/linux-megacli/pkg-descr
@@ -0,0 +1,10 @@
+LSI Logic MegaRAID SAS MegaCLI Release
+
+This is the Linux console based management utility for the LSI
+MegaRAID SAS family of controllers.
+
+FreeBSD >= 6.1 supports running this tool by the means of the
+mfi_linux.ko kernel module and the /dev/mfi0 device.
+
+Author: LSI Logic Corporation
+WWW: http://www.lsi.com/
diff --git a/sysutils/linux-megacli/pkg-message b/sysutils/linux-megacli/pkg-message
new file mode 100644
index 000000000000..08da2f475d0d
--- /dev/null
+++ b/sysutils/linux-megacli/pkg-message
@@ -0,0 +1,30 @@
+
+===================================================================
+This port installed a commercial software product with a restricted
+license. Please review the license terms at this URL:
+
+ http://www.lsi.com/cm/License.do
+
+===================================================================
+
+Add the following to /boot/loader.conf
+
+ # For MegaCLi
+ mfi_linux_load="YES"
+
+Add the following to /etc/sysctl.conf
+
+ # For MegaCLi
+ compat.linux.osrelease=2.6.12
+
+Add the following to /etc/fstab
+
+ # For MegaCLi
+ linsys /compat/linux/sys linsysfs rw 0 0
+
+If you find mfi(4) too verbose, see mfi_evt_class_t in
+/usr/src/sys/dev/mfi/mfireg.h for values you can use in the
+
+hw.mfi.event_class
+
+sysctl variable
diff --git a/sysutils/linux-megacli/pkg-plist b/sysutils/linux-megacli/pkg-plist
new file mode 100644
index 000000000000..7c80232bf065
--- /dev/null
+++ b/sysutils/linux-megacli/pkg-plist
@@ -0,0 +1,4 @@
+sbin/megacli
+libexec/MegaCli
+%%PORTDOCS%%%%DOCSDIR%%/readme.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%