oracle-instantclient-sqlplus-11.2.0.2.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2013 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}.0"
  5. MY_P_amd64="${PN/oracle-instantclient-/instantclient-}-linux-x86-64-${PV}.0"
  6. S="${WORKDIR}"
  7. DESCRIPTION="Oracle 11g client installation for Linux: SQL*Plus"
  8. HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html"
  9. SRC_URI="x86? ( ${MY_P_x86}.zip )
  10. amd64? ( ${MY_P_amd64}.zip )"
  11. LICENSE="OTN"
  12. SLOT="0"
  13. KEYWORDS="~x86 ~amd64"
  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_11_2
  37. insinto /usr/$(get_libdir)/oracle/${PV}/client/lib
  38. doins libsqlplus.so libsqlplusic.so
  39. insinto /usr/$(get_libdir)/oracle/${PV}/client/sqlplus/admin/
  40. doins glogin.sql
  41. dodir /usr/$(get_libdir)/oracle/${PV}/client/bin
  42. cd "${S}"/instantclient_11_2
  43. exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin
  44. doexe sqlplus
  45. dodir /usr/bin
  46. dosym "${D}"/usr/$(get_libdir)/oracle/${PV}/client/bin/sqlplus /usr/bin/sqlplus
  47. }
  48. pkg_postinst() {
  49. elog "The SQL*Plus package for Oracle 11g has been installed."
  50. elog "You may wish to install the oracle-instantclient-jdbc (for"
  51. elog "the supplemental JDBC functionality) package as well."
  52. elog
  53. elog "If you have any questions, be sure to read the README:"
  54. elog "http://otn.oracle.com/docs/tech/sql_plus/10102/readme_ic.htm"
  55. }