# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 #set DESCRIPTION="3ware 3DM2 Management Utility" HOMEPAGE="http://www.3ware.com" LICENSE="3ware" SLOT="0" # binary packages KEYWORDS="-* x86 amd64" IUSE="" # stripping seems to break this sometimes RESTRICT="fetch nostrip nomirror" # binary packages DEPEND="" RDEPEND="virtual/libc dev-libs/openssl" # funky tarball name MY_P="${PN}-${ARCH/amd64/x86_64}-${PV}" # portage can't download the source due to EULA, but # set the correct download URL based on architecture # anyways. DOWNLOAD_URL="x86? ( ${HOMEPAGE}/support/download_${PV}.asp?SNO=495 ) amd64? ( ${HOMEPAGE}/support/download_${PV}.asp?SNO=496 )" # URLs are only valid after clicking through the EULA SRC_URI="x86? ( ${HOMEPAGE}/download/Escalade9000Series/${PV}/${MY_P}.tgz ) amd64? ( ${HOMEPAGE}/download/Escalade9000Series/${PV}/${MY_P}.tgz )" # set source directory including architecture S="${WORKDIR}/${MY_P}" # unpack source src_unpack() { unpack ${MY_P}.tgz cp -p ${FILESDIR}/3dm2.conf ${WORKDIR}/${ARCH}/ sed -ie "s/\$VERSION/${P}/" ${WORKDIR}/${ARCH}/3dm2.conf cp -p ${FILESDIR}/rc.3dm2 ${WORKDIR}/${ARCH}/ } # display info about supported 3ware adapters supportedcards() { einfo "This binary supports all current cards, including, but not" einfo "limited to:" einfo " " einfo "PATA: 7210, 7410, 7450, 7810, 7850, 7000-2, 7500-4, 7500-8," einfo " 7500-12, 7006-2, 7506-4, 7506-4LP, 7506-8, 7506-12" einfo " " einfo "SATA: 8500-4, 8500-8, 8500-12, 8006-2, 8506-4, 8506-12," einfo " 8506-8MI, 8506-12MI, 9500S-4LP, 9500S-8, 9500S-12," einfo " 9500S-8MI, 9500S-12MI" } # tell user what cards are supported pkg_setup() { supportedcards } # 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 " " supportedcards } # install the 3dm2 utility src_install() { cd ${WORKDIR}/${ARCH} # extract files tar xzf 3dm-lnx.tgz tar xzf 3dm-help.tgz tar xzf 3dm-msg.tgz # create directories dodir /etc/3dm2 dodir /etc/init.d dodir /usr/share/${P}/help/en dodir /usr/share/${P}/msg # install binaries into /usr dosbin 3dm2 # install config files insinto /etc/3dm2 doins 3dm2.conf # install init script exeinto /etc/init.d newexe rc.3dm2 3dm2 # install help files insinto /usr/share/${P}/help/en doins en/* # install messages insinto /usr/share/${P}/msg doins t*_en }