# 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-${ARCH/amd64/x86_64}-${PV}" if use x86; then DOWNLOAD_URL="${HOMEPAGE}/support/download_${PV}.asp?SNO=521" fi if use amd64; then DOWNLOAD_URL="${HOMEPAGE}/support/download_${PV}.asp?SNO=522" fi SRC_URI="${HOMEPAGE}/download/Escalade9000Series/${PV}/${MY_P}.tgz" S="${WORKDIR}/${MY_P}" pkg_nofetch() { einfo Please visit the following URL to download the tarball: einfo einfo ${DOWNLOAD_URL} einfo einfo Download the x86 version for 32-bit installs or the amd64 einfo version for 64-bit machines. einfo einfo Place your downloads into: einfo 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} 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 dodoc version.txt || die exeinto /etc/init.d newexe ${FILESDIR}/rc.3dm2 3dm2 || die dohtml *.html || die dohtml *.css || die dohtml v || die dohtml -r images || die dohtml -r scripts || die } pkg_postinst() { einfo einfo "Please configure 3dm2 on localhost:888 before using it." einfo "The default password is 3ware." einfo }