# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="3ware 3DM2 Management Utility" HOMEPAGE="http://www.3ware.com" LICENSE="3ware" SLOT="0" KEYWORDS="-* ~x86 ~amd64" IUSE="" RESTRICT="fetch nostrip nomirror" DEPEND="virtual/libc dev-libs/openssl" MY_P="${PN}-linux-${PV}" DOWNLOAD_URL_APP="${HOMEPAGE}/support/dnload_agree.asp?sno=0" SRC_URI="${HOMEPAGE}/download/Escalade9000Series/${PV}/${PN}-linux-${PV}.tgz" S="${WORKDIR}/${MY_P}" pkg_nofetch() { einfo Please agree to the license at einfo ${DOWNLOAD_URL_APP} einfo Then visit the following URL to download the tarball: einfo ${SRC_URI} einfo Place your downloads into: einfo ${DISTDIR} einfo } src_unpack() { unpack ${MY_P}.tgz || die uncompressing ${MY_P}.tgz failed cd ${WORKDIR} tar xvf 3dm-lnx.tgz || die uncompressing 3dm-lnx.tgz failed tar xvf 3dm-help.tgz || die uncompressing 3dm-help.tgz failed tar xvf 3dm-msg.tgz || die uncompressing 3dm-msg.tgz failed cp ${FILESDIR}/3dm2.conf ${WORKDIR} sed -ie "s/\$VERSION/${P}/" ${WORKDIR}/3dm2.conf } src_install() { cd ${WORKDIR} if use x86; then cp 3dm2.x86 3dm2 fi if use amd64; then cp 3dm2.x86_64 3dm2 fi dosbin 3dm2 || die dodir /etc/3dm2/ 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 newexe ${FILESDIR}/rc.3dm2 3dm2 || die cd ${WORKDIR}/en dohtml *.html || die dohtml *.css || die dohtml v || die dohtml -r images || die dohtml -r scripts || die } pkg_postinst() { if use x86; then LOCAL_URL="https://127.0.0.1:888/" fi if use amd64; then LOCAL_URL="http://127.0.0.1:888/" fi einfo einfo "Please configure 3dm2 on ${LOCAL_URL} before using it." einfo "The default password is 3ware." einfo }