# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Macromedia's Flex 2 SDK for building Flash 9 .swf applications." HOMEPAGE="http://www.flex.org/" SRC_URI="http://trials.adobe.com/pub/esd/trial/flex_sdk_2.zip" LICENSE="Macromedia" SLOT="0" KEYWORDS="-* ~x86 ~amd64" IUSE="examples" RESTRICT="fetch" DEPEND="" RDEPEND="virtual/jre >=net-www/netscape-flash-9" pkg_nofetch() { einfo "Please download the Flex 2 SDK from ${HOMEPAGE}" einfo "and put ${A} in ${DISTDIR}" einfo "then re-emerge this package." } src_install() { cd ${WORKDIR} local dirs="bin frameworks lib" if use examples; then local dirs="${dirs} resources samples" fi dodir /opt/${PN} # don't want to waste space copying windows binaries rm bin/*.exe # some of macromedia's shell scripts have windows line endings (??) edos2unix bin/* # library sources don't seem to be needed for anything # (and there are a lot of them!) rm -rf frameworks/source # copy remaining contents of dirs for i in ${dirs}; do cp -pPR ${i} ${D}/opt/${PN}/ || die "failed to copy" done dohtml *.htm # for startup scripts local envfile=50${PN} echo "PATH=\"/opt/${PN}/bin/\"" >> ${envfile} echo "FLEX_HOME=\"/opt/${PN}\"" >> ${envfile} doenvd ${envfile} # link startup scripts into /bin # redundant with PATH? but nice to see them there local binaries="compc fdb mxmlc" for i in ${binaries}; do dosym /opt/${PN}/bin/${i} /bin/${i} done } pkg_postinst() { einfo "Remember to source /etc/profile in open shells." }