summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-block/megarc/ChangeLog10
-rwxr-xr-xsys-block/megarc/files/megarc43
-rw-r--r--sys-block/megarc/megarc-1.11.ebuild33
-rw-r--r--sys-block/megarc/metadata.xml10
4 files changed, 96 insertions, 0 deletions
diff --git a/sys-block/megarc/ChangeLog b/sys-block/megarc/ChangeLog
new file mode 100644
index 000000000000..ecad2b96ece3
--- /dev/null
+++ b/sys-block/megarc/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-block/megarc
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/megarc/ChangeLog,v 1.1 2008/04/23 21:32:43 wschlich Exp $
+
+*megarc-1.11 (23 Apr 2008)
+
+ 23 Apr 2008; Wolfram Schlich <wschlich@gentoo.org> +files/megarc,
+ +metadata.xml, +megarc-1.11.ebuild:
+ initial import
+
diff --git a/sys-block/megarc/files/megarc b/sys-block/megarc/files/megarc
new file mode 100755
index 000000000000..7497b686fe6a
--- /dev/null
+++ b/sys-block/megarc/files/megarc
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# Get the major number of the megadev ioctl device node
+megadev_major=$(egrep '[[:space:]]megadev$' /proc/devices 2>/dev/null | awk '{print $1}' 2>/dev/null)
+megadev_node=/dev/megadev0
+
+# MegaRAID device node major number found
+if [ -z "${megadev_major}" ]; then
+ echo "ERROR: failed to determine device node major number"
+ exit 1
+fi
+if [ -e "${megadev_node}" ]; then
+ if ! rm -f "${megadev_node}"; then
+ echo "ERROR: failed to remove existing device node ${megadev_node}"
+ exit 1
+ fi
+fi
+if ! mknod "${megadev_node}" c "${megadev_major}" 0; then
+ echo "ERROR: failed to create device node ${megadev_node}"
+ exit 1
+fi
+
+# Create temporary working directory for megarc
+# (as it creates megarc.log in CWD for example)
+# and change to it afterwards
+megarc_tmpdir=$(mktemp -q -d -t -p /var/tmp megarc.XXXXXX)
+if [ -z "${megarc_tmpdir}" ] || [ ! -d "${megarc_tmpdir}" ]; then
+ echo "ERROR: failed to create temporary megarc working directory"
+ exit 1
+elif ! cd "${megarc_tmpdir}"; then
+ echo "ERROR: failed to change to temporary megarc working directory '${megarc_tmpdir}'"
+ exit 1
+fi
+
+# Start the real megarc binary
+"${0##*/}/megarc.bin" "${@}"
+
+# Cleanup
+echo "Removing temporary megarc working directory"
+rm -rf "${megarc_tmpdir}"
+
+# That's all
+echo "Finished. Have a nice day."
diff --git a/sys-block/megarc/megarc-1.11.ebuild b/sys-block/megarc/megarc-1.11.ebuild
new file mode 100644
index 000000000000..daef07dfe729
--- /dev/null
+++ b/sys-block/megarc/megarc-1.11.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/megarc/megarc-1.11.ebuild,v 1.1 2008/04/23 21:32:43 wschlich Exp $
+
+inherit multilib
+
+DESCRIPTION="LSI Logic MegaRAID Text User Interface management tool"
+HOMEPAGE="http://www.lsi.com"
+SRC_URI="http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_linux_${PN}_${PV}.zip"
+
+LICENSE="LSI"
+SLOT="0"
+# This package can never enter stable, it can't be mirrored and upstream
+# can remove the distfiles from their mirror anytime.
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="app-arch/unzip
+ doc? ( app-text/antiword )"
+
+RESTRICT="strip mirror test"
+
+S="${WORKDIR}"
+
+src_compile() {
+ useq doc && antiword ut_linux.doc > ${PN}-manual.txt
+}
+
+src_install() {
+ useq doc && dodoc ${PN}-manual.txt
+ newdoc ut_linux_${PN}_${PV}.txt ${PN}-release-${PV}.txt
+ dosbin "${FILESDIR}"/megarc megarc.bin
+}
diff --git a/sys-block/megarc/metadata.xml b/sys-block/megarc/metadata.xml
new file mode 100644
index 000000000000..a7162e9b7104
--- /dev/null
+++ b/sys-block/megarc/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+</maintainer>
+</pkgmetadata>