aws-rds-tools-1.6.001.ebuild 1.5 KB

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