# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="3ware Disk Managment Web Utility" HOMEPAGE="http://www.3ware.com" LICENSE="3ware" SLOT="0" KEYWORDS="x86 amd64" IUSE="" RESTRICT="nomirror" DOWNLOAD_URL="http://www.3ware.com/support/download_${PV}.asp" SRC_URI="http://www.3ware.com/download/Escalade9650SE-Series/${PV}/3DM2-Linux-${PV}.tgz" DEPEND="virtual/libc virtual/logger virtual/mta" S="${WORKDIR}" src_compile() { tar zxf 3dm-lnx.tgz || die "could not untar main archive." tar zxf 3dm-help.tgz || die "could not untar help files" tar zxf 3dm-msg.tgz || die "could not untar error message archive." cp ${FILESDIR}/3dm2.conf ${WORKDIR} sed -ie "s/\$VERSION/${PF}/" ${WORKDIR}/3dm2.conf } src_install() { MYARCH="${ARCH/amd64/x86_64}" newsbin 3dm2.${MYARCH} 3dm2 insinto /usr/share/doc/${PF}/en doins -r en/* dodir /etc/3dm2/msg insinto /etc/3dm2/msg doins tdm_msg_en doins tw_msg_en insinto /etc/3dm2 doins 3dm2.conf exeinto /etc/init.d doexe ${FILESDIR}/3dm2 } pkg_preinst() { # stop any running version if [ -x "/etc/init.d/3dm2" ]; then /etc/init.d/3dm2 stop fi } pkg_postinst() { einfo "Start 3dm2, then connect to the server port https://:888" einfo "Login as administrator, password '3ware'" einfo "Change the settings from the GUI" einfo "" einfo "To change the ssl cert, place a file called 3dm2.pem in /etc/3dm2" einfo "It must contain the certificate and the key." }