aws-cw-tools-1.0.12.1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. DESCRIPTION="The API tools serve as the client interface to the Amazon CloudWatch web service"
  5. HOMEPAGE="http://aws.amazon.com/developertools/2534"
  6. # SRC_URI="http://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip"
  7. SRC_URI="mirror://sabayon/${CATEGORY}/CloudWatch-${PV}.zip"
  8. S="${WORKDIR}/CloudWatch-${PV}"
  9. LICENSE="Amazon"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE=""
  13. DEPEND="app-arch/unzip"
  14. RDEPEND="virtual/jre"
  15. RESTRICT="mirror"
  16. src_unpack() {
  17. unpack ${A}
  18. cd "$S"
  19. find . -name '*.cmd' -delete || die
  20. }
  21. src_install() {
  22. dodir /opt/${PN}
  23. insinto /opt/${PN}/lib
  24. doins -r "${S}"/lib/*
  25. exeinto /opt/${PN}/bin
  26. doexe "${S}"/bin/*
  27. dodir /etc/env.d
  28. cat - > "${T}"/99${PN} <<EOF
  29. AWS_CLOUDWATCH_HOME=/opt/${PN}
  30. PATH=/opt/${PN}/bin
  31. ROOTPATH=/opt/${PN}/bin
  32. EOF
  33. doenvd "${T}"/99${PN}
  34. dodoc "THIRDPARTYLICENSE.TXT"
  35. }
  36. pkg_postinst() {
  37. ewarn "Remember to run: env-update && source /etc/profile if you plan"
  38. ewarn "to use these tools in a shell before logging out (or restarting"
  39. ewarn "your login manager)"
  40. elog
  41. elog "You need to put the following in your ~/.bashrc replacing the"
  42. elog "values with the full path to your AWS credentials file."
  43. elog
  44. elog " export AWS_CREDENTIAL_FILE=/path/and_filename_of_credential_file"
  45. elog
  46. elog "It should contains two lines: the first line lists the AWS Account's"
  47. elog "AWS Access Key ID, and the second line lists the AWS Account's"
  48. elog "Secret Access Key. For example:"
  49. elog
  50. elog " AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE"
  51. elog " AWSSecretKey=wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY"
  52. }