# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils SLOT="3" #LICENSE="LGPL-2.1" LICENSE="GLOBUS" KEYWORDS="x86 ppc ~alpha ~amd64 ~ia64 ~hppa" DESCRIPTION="The Globus Toolkit - grid middleware package bundled with gsi_ssh and myproxy" IUSE="" SRC_URI="ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/installers/src/gt3.2.1-all-source-installer.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_xio-0.11.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_io-5.5.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_nexus-6.5.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_ftp_client-2.9.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_gram_client_tools-4.3.tar.gz \ ftp://ftp.ncsa.uiuc.edu/aces/gssapi-openssh/bundle/3.5/gsi_openssh_bundle-3.5-src.tar.gz \ ftp://ftp.ncsa.uiuc.edu/aces/myproxy/myproxy-1.16.tar.gz" HOMEPAGE="http://www.globus.org/ \ http://grid.ncsa.uiuc.edu/ssh/ \ http://grid.ncsa.uiuc.edu/myproxy/" DEPEND=">=dev-java/ant-1.6.2 >=virtual/jdk-1.4 >=dev-lang/perl-5.6.2" src_unpack() { tar xzf ${DISTDIR}/gt3.2.1-all-source-installer.tar.gz cd gt3.2.1-all-source-installer tar xzf gpt-3.0.1-src.tar.gz epatch ${FILESDIR}/globus-fix.diff } src_compile() { # Globus gets compilled and installed in a single step - nothing # can be done here : } src_install() { # globus build dies when you set CFLAGS - don't ask why ;) # seriously: there's some internal problem in the gpt causing it to parse # CXXFLAGS wrongly and botching the entire build... export CFLAGS="" export CXXFLAGS="" # flavor choice - how the globus should set its internals # the dbg should stay - seems to be "default" globus flavor # so we won't argue with that ;) # the amd64 has to be investigated - I don't have the hardware # to test it but the globus installer puts it in the 32 bits # "default" (maybe it's simply too old). anyways - 32 bit version # is for some reason working nicer than the 64 bit compilled one # (tested on an itanium2 machine personally) # same goes for the hppa and alpha archs - no testing, added because # globus recognizes them in the installer - so they SHOULD be working if use ia64 || use alpha; then export MY_FLAVOR="gcc64dbg" elif use hppa; then export MY_FLAVOR="vendorcc32dbg" else export MY_FLAVOR="gcc32dbg" fi export MY_FLAVOR_THREADS="${MY_FLAVOR}pthr" # This can be taken from the environment instead # of having "the only right path" - OTOH it's not very nice having # ebuild dependant on the external environment export REAL_GPT_LOCATION="/usr/local/globus" export REAL_GLOBUS_LOCATION="/usr/local/globus" # a hack to make globus install itself into the # ordered directory and later on to be placed # in a single GLOBUS_LOCATION - it's better this way # because of globus-modified versions of many popular libraries/utilities # it might cause havoc with the regular system-installed versions export GPT_LOCATION=${D}${REAL_GPT_LOCATION} export GLOBUS_LOCATION=${D}${REAL_GLOBUS_LOCATION} cd ${WORKDIR}/gt3.2.1-all-source-installer cd gpt-3.0.1 LANG="" ./build_gpt || die "build_gpt failed" cd .. ./install-gt3 -flavor ${MY_FLAVOR} $GLOBUS_LOCATION || die "install-gt3 failed" ./install-gt3-mmjfs -flavor ${MY_FLAVOR} $GLOBUS_LOCATION || die "install-gt3-mmjfs failed" export GPT_BUILD="${GPT_LOCATION}/sbin/gpt-build" ${GPT_BUILD} ${DISTDIR}/globus_ftp_client-2.9.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREADS} || die "ftp_client failed" ${GPT_BUILD} ${DISTDIR}/globus_gram_client_tools-4.3.tar.gz ${MY_FLAVOR} || die "gram_client_tools failed" ${GPT_BUILD} ${DISTDIR}/globus_nexus-6.5.tar.gz ${MY_FLAVOR} || die "nexus failed" ${GPT_BUILD} ${DISTDIR}/globus_io-5.5.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREADS} || die "io failed" ${GPT_BUILD} ${DISTDIR}/globus_xio-0.11.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREADS} || die "xio failed" ${GPT_BUILD} ${DISTDIR}/gsi_openssh_bundle-3.5-src.tar.gz ${MY_FLAVOR} || die "gsi_ssh failed" ${GPT_BUILD} ${DISTDIR}/myproxy-1.16.tar.gz ${MY_FLAVOR} || die "myproxy failed" dodir /etc/env.d || die "dodir /etc/env.d failed" echo -e "GLOBUS_LOCATION=${REAL_GLOBUS_LOCATION}" > \ ${D}/etc/env.d/90gt3 echo -e "GPT_LOCATION=${REAL_GPT_LOCATION}" >> \ ${D}/etc/env.d/90gt3 if [ ${GPT_LOCATION} = ${GLOBUS_LOCATION} ]; then echo "PATH=${REAL_GLOBUS_LOCATION}/bin" >> \ ${D}/etc/env.d/90gt3 echo "ROOTPATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GLOBUS_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo "LDPATH=${REAL_GLOBUS_LOCATION}/lib" >> \ ${D}/etc/env.d/90gt3 echo "MANPATH=${REAL_GLOBUS_LOCATION}/man" >> \ ${D}/etc/env.d/90gt3 else echo "PATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GPT_LOCATION}/bin" >> \ ${D}/etc/env.d/90gt3 echo -n "ROOTPATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GLOBUS_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo ":${REAL_GPT_LOCATION}/bin:${REAL_GPT_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo "LDPATH=${REAL_GLOBUS_LOCATION}/lib:${REAL_GPT_LOCATION}/lib" >> \ ${D}/etc/env.d/90gt3 echo "MANPATH=${REAL_GLOBUS_LOCATION}/man:${REAL_GPT_LOCATION}/man" >> \ ${D}/etc/env.d/90gt3 fi } pkg_postinst(){ export GPT_LOCATION=${REAL_GPT_LOCATION} export GLOBUS_LOCATION=${REAL_GLOBUS_LOCATION} ${GPT_LOCATION}/sbin/gpt-postinstall einfo Globus Toolkit has been installed into the ${GLOBUS_LOCATION} directory einfo along with the gsi_ssh bundle and all the security advisories issued to einfo 31.01.2005 } # There should be something cleaning the GLOBUS_LOCATION # from the system - because gpt-postinstall is run after # the files are moved to the real dir (and it has to be # this way) the files created by it are left over after # unmerging which may prove disastrous when re-emerging. # But rm -rf $GLOBUS_LOCATION seems a bit overboard, cause # the directory may contain user modifications and will contain # Globus services logs which may be of value as well. #pkg_postrm() { # #}