# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ KEYWORDS="~amd64" LICENSE="NONE_YET" SLOT="0" HOMEPAGE="http://salilab.org/modeller/" # This package name does not conform to gentoos ebuild naming requirements... # namely, modeller-8v2 will not work due to a non-integer in the ${V}. MY_V="8v2" MY_P="${PN}-${MY_V}" SRC_URI="http://salilab.org/modeller/${MY_V}/${MY_P}.tar.gz" DESCRIPTION="MODELLER is used for homology or comparative modeling of protein three-dimensional structures." IUSE="" DEPEND="virtual/python" src_install() { # I basically perform every operation of the modeller-8v2 Install script, # hence the introduction of a few extra variables. PROGRAM="mod8v2" MY_D=/opt/${P} if [[ "${ARCH}" == "x86" ]] ; then EXECUTABLE_TYPE="i386-intel8" elif [[ "${ARCH}" == "amd64" ]] ; then EXECUTABLE_TYPE="x86_64-intel8" else echo "Your arch "${ARCH}" does not appear supported at this time." fi echo -e "\nModeller requires a license key that can be obtained freely" echo -e "for NON-COMMERCIAL USE by registering at ${HOMEPAGE}\n" echo "Enter MODELLER key: " read KEY_MODELLER cd ${WORKDIR}/${MY_P} dodir ${MY_D} cp -p README INSTALLATION ${D}${MY_D} || die "Failed to install README files." dodir ${MY_D}/bin cp -rp bin/*.top bin/lib bin/${PROGRAM}_${EXECUTABLE_TYPE} ${D}${MY_D}/bin dodir ${MY_D}/modlib cp -rp modlib ${D}${MY_D}/ || die "Failed to install modlib" dodir /usr/share/doc/${MY_P}/examples dodir /usr/share/doc/${MY_P}/html cp -rp examples ${D}/usr/share/doc/${MY_P} || die "Failed to install examples." cp -p doc/*.png doc/*.html ${D}/usr/share/doc/${MY_P}/html sed -e "s;EXECUTABLE_TYPE${MY_V}=xxx;EXECUTABLE_TYPE${MY_V}=$EXECUTABLE_TYPE;" \ -e "s;MODINSTALL${MY_V}=xxx;MODINSTALL${MY_V}=${MY_D};" \ -e "s;KEY_MODELLER${MY_V}=xxx;KEY_MODELLER${MY_V}=$KEY_MODELLER;" \ bin/modscript > ${D}${MY_D}/bin/${PROGRAM} \ || die "Failed to generate modeller script." into /usr/bin dosym ${D}${MY_D}/bin/${PROGRAM} /usr/bin/${PROGRAM} || die "Failed to make symlink." chmod a+x ${D}${MY_D}/bin/${PROGRAM} chmod a+x ${D}${MY_D}/bin/${PROGRAM}_$EXECUTABLE_TYPE } pkg_postinst() { ewarn "" ewarn " If you need to define your own residues" ewarn " read the FAQ and edit the following files:" ewarn "" ewarn " ${MY_D}/modlib/top_heav.lib" ewarn " ${MY_D}/modlib/radii.lib" ewarn " ${MY_D}/modlib/radii14.lib" ewarn " ${MY_D}/modlib/restyp.lib" ewarn "" ewarn " Good Luck and Happy Modeling :D" ewarn "" }