oracle-instantclient-sqlplus-10.2.0.3.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils multilib
  4. MY_P_x86="${PN/oracle-/}-linux32-${PV}-20061115"
  5. MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20070103"
  6. S=${WORKDIR}
  7. DESCRIPTION="Oracle 10g client installation for Linux: SQL*Plus"
  8. HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html"
  9. SRC_URI="amd64? ( ${MY_P_amd64}.zip )
  10. x86? ( ${MY_P_x86}.zip )"
  11. LICENSE="OTN"
  12. SLOT="0"
  13. KEYWORDS="-* amd64 x86"
  14. RESTRICT="fetch"
  15. IUSE=""
  16. RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}"
  17. DEPEND="${RDEPEND}
  18. app-arch/unzip"
  19. pkg_setup() {
  20. MY_P=MY_P_${ARCH}
  21. export MY_P=${!MY_P}
  22. }
  23. pkg_nofetch() {
  24. eerror "Please go to:"
  25. eerror " ${HOMEPAGE}"
  26. eerror "select your platform and download the"
  27. eerror "SQL*Plus package. Put it in:"
  28. eerror " ${DISTDIR}"
  29. eerror "after downloading it."
  30. }
  31. src_unpack() {
  32. unzip "${DISTDIR}"/${MY_P}.zip
  33. }
  34. src_install() {
  35. dodir /usr/$(get_libdir)/oracle/${PV}/client/lib
  36. cd "${S}"/instantclient_10_2
  37. insinto /usr/$(get_libdir)/oracle/${PV}/client/lib
  38. doins glogin.sql libsqlplus.so libsqlplusic.so
  39. dodir /usr/$(get_libdir)/oracle/${PV}/client/bin
  40. cd "${S}"/instantclient_10_2
  41. exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin
  42. doexe sqlplus
  43. dodir /usr/bin
  44. dosym "${D}"/usr/$(get_libdir)/oracle/${PV}/client/bin/sqlplus /usr/bin/sqlplus
  45. }
  46. pkg_postinst() {
  47. elog "The SQL*Plus package for Oracle 10g has been installed."
  48. elog "You may wish to install the oracle-instantclient-jdbc (for"
  49. elog "the supplemental JDBC functionality) package as well."
  50. elog
  51. elog "If you have any questions, be sure to read the README:"
  52. elog "http://otn.oracle.com/docs/tech/sql_plus/10102/readme_ic.htm"
  53. elog
  54. elog "oracle-instantclient-* packages aren't installed in different"
  55. elog "SLOTs any longer. You may want to uninstall older versions."
  56. }