ports/106012: New port: sysutils/megacli

Ruben van Staveren ruben at verweg.com
Wed Nov 29 13:40:17 UTC 2006


>Number:         106012
>Category:       ports
>Synopsis:       New port: sysutils/megacli
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 29 13:40:13 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ruben van Staveren
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD helium.verweg.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #21: Sat Nov 4 14:31:36 CET 2006 root at helium.verweg.com:/usr/obj/usr/cvsup/6-stable/src/sys/HELIUM-SMP i386


>Description:

LSI MegaRAID SAS controller management utility

for mfi(4) like Dell PERC 5/i

>How-To-Repeat:
>Fix:


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	linux-megacli
#	linux-megacli/Makefile
#	linux-megacli/files
#	linux-megacli/files/megacli.sh.in
#	linux-megacli/distinfo
#	linux-megacli/pkg-descr
#	linux-megacli/pkg-plist
#	linux-megacli/pkg-message
#
echo c - linux-megacli
mkdir -p linux-megacli > /dev/null 2>&1
echo x - linux-megacli/Makefile
sed 's/^X//' >linux-megacli/Makefile << 'END-of-linux-megacli/Makefile'
X# Ports collection makefile for:  linux-megacli
X# Date created:			  Wed, Nov 29th, 2006
X# Whom:				  Ruben van Staveren (ruben at verweg.com)
X#
X# $FreeBSD$
X#
X
XPORTNAME=		megacli
XPORTVERSION=		1.01.09
XCATEGORIES=		sysutils linux
XMASTER_SITES=		http://lsi.com/files/support/rsa/MR_SAS_1.0/
XPKGNAMEPREFIX=	linux-
XDISTNAME=		Linux_MegaCli_${PORTVERSION}
X
XMAINTAINER=		ruben at verweg.com
XCOMMENT=		LSI MegaRAID SAS controller management utility
X
XNO_WRKSUBDIR=		yes
XUSE_ZIP=		yes
XRESTRICTED=		Redistribution prohibited, see: http://lsi.com/cm/License.do
XONLY_FOR_ARCHS=		i386 amd64
XUSE_LINUX=		yes
XSUB_FILES=		megacli.sh
X
X# From bsd.linux.rpm.mk
XRPM2CPIO?=			${LOCALBASE}/bin/rpm2cpio
XEXTRACT_DEPENDS+=		${RPM2CPIO}:${PORTSDIR}/archivers/rpm
X
Xdo-build:
X	@cd ${WRKSRC} && \
X		${UNZIP_CMD} MegaCliLin.zip && \
X		${RPM2CPIO} MegaCli-${PORTVERSION}-0.i386.rpm | ${CPIO} -id --quiet
X	@${BRANDELF} -t Linux ${WRKSRC}/usr/sbin/MegaCli
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/megacli.sh ${PREFIX}/sbin/megacli
X	${INSTALL_PROGRAM} ${WRKSRC}/usr/sbin/MegaCli ${PREFIX}/libexec
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/Read-me.txt ${DOCSDIR}/readme.txt
X.endif
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 602000
XIGNORE=			needs at least FreeBSD 6.2 and mfi_linux.ko
X.endif
X
X.include <bsd.port.post.mk>
END-of-linux-megacli/Makefile
echo c - linux-megacli/files
mkdir -p linux-megacli/files > /dev/null 2>&1
echo x - linux-megacli/files/megacli.sh.in
sed 's/^X//' >linux-megacli/files/megacli.sh.in << 'END-of-linux-megacli/files/megacli.sh.in'
X#!/bin/sh
X
X# check for root user
X#
Xif [ `id -u` -ne 0 ]
Xthen
X	echo You must be root to run `basename $0`.
X	exit 1
Xfi
X
Xif ! [ `sysctl -n compat.linux.osrelease` = "2.6.12" ]; then
X	echo You need to set compat.linux.osrelease to 2.6.12 to run `basename $0`.
X	exit 1
Xfi
X
Xif ! [ -d /usr/compat/linux/sys ]; then
X	echo You need to mount linsysfs to run `basename $0`.
X	exit 1
Xfi
X
X# check for active mfi_linux.ko
X#
Xif ! kldstat -q -m mfi_linux
Xthen
X	if kldload mfi_linux
X	then
X		echo 'mfi_linux module loaded.'
X	else
X		echo 'mfi_linux module failed to load.'
X		exit 1
X	fi
Xfi
X
Xexec %%PREFIX%%/libexec/MegaCli ${*}
END-of-linux-megacli/files/megacli.sh.in
echo x - linux-megacli/distinfo
sed 's/^X//' >linux-megacli/distinfo << 'END-of-linux-megacli/distinfo'
XMD5 (Linux_MegaCli_1.01.09.zip) = 819808210ba2233432386b00fdfe138d
XSHA256 (Linux_MegaCli_1.01.09.zip) = b0a8a6f15338ecc36cb15f5da876722ff8d7e2fddc3b820fb2231afee2f95f48
XSIZE (Linux_MegaCli_1.01.09.zip) = 576961
END-of-linux-megacli/distinfo
echo x - linux-megacli/pkg-descr
sed 's/^X//' >linux-megacli/pkg-descr << 'END-of-linux-megacli/pkg-descr'
XLSI Logic MegaRAID SAS MegaCLI Release
X
XThis is the Linux console based management utility for the LSI
XMegaRAID SAS family of controllers.
X
XFreeBSD >= 6.1 supports running this tool by the means of the
Xmfi_linux.ko kernel module and the /dev/mfi0 device.
X
XAuthor:	LSI Logic Corporation
XWWW:	http://www.lsi.com/
END-of-linux-megacli/pkg-descr
echo x - linux-megacli/pkg-plist
sed 's/^X//' >linux-megacli/pkg-plist << 'END-of-linux-megacli/pkg-plist'
Xsbin/megacli
Xlibexec/MegaCli
X%%PORTDOCS%%%%DOCSDIR%%/readme.txt
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-linux-megacli/pkg-plist
echo x - linux-megacli/pkg-message
sed 's/^X//' >linux-megacli/pkg-message << 'END-of-linux-megacli/pkg-message'
X
X===================================================================
XThis port installed a commercial software product with a restricted
Xlicense. Please review the license terms at this URL:
X
X	http://www.lsi.com/cm/License.do
X
X===================================================================
X
XAdd the following to /boot/loader.conf
X
X	# For MegaCLi
X	mfi_linux_load="YES"
X
XAdd the following to /etc/sysctl.conf
X
X	# For MegaCLi
X	compat.linux.osrelease=2.6.12
X
XAdd the following to /etc/fstab
X
X	# For MegaCLi
X	linsys      /compat/linux/sys   linsysfs        rw      0       0
X
XIf you find mfi(4) too verbose, see mfi_evt_class_t in
X/usr/src/sys/dev/mfi/mfireg.h for values you can use in the
X
Xhw.mfi.event_class
X
Xsysctl variable
END-of-linux-megacli/pkg-message
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list