oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils multilib pax-utils
  5. MY_PLAT_x86="Linux x86"
  6. MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip"
  7. MY_PLAT_amd64="Linux x86-64"
  8. MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip"
  9. DESCRIPTION="Oracle 11g Instant Client: SQL*Plus"
  10. HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
  11. SRC_URI="
  12. x86? ( ${MY_A_x86} )
  13. amd64? ( ${MY_A_amd64} )
  14. "
  15. LICENSE="OTN"
  16. SLOT="0"
  17. KEYWORDS="amd64 x86"
  18. RESTRICT="fetch"
  19. IUSE=""
  20. DEPEND="app-arch/unzip"
  21. RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
  22. S="${WORKDIR}"/instantclient_11_2
  23. QA_PREBUILT="
  24. usr/lib*/oracle/${PV}/client/lib*/lib*
  25. usr/lib*/oracle/${PV}/client/bin/sqlplus
  26. "
  27. my_arch() {
  28. # platform name
  29. MY_PLAT=MY_PLAT_${ARCH}
  30. export MY_PLAT=${!MY_PLAT}
  31. # distfile
  32. MY_A=MY_A_${ARCH}
  33. export MY_A=${!MY_A}
  34. }
  35. pkg_nofetch() {
  36. my_arch
  37. eerror "Please go to"
  38. eerror " ${HOMEPAGE%/*}/index-097480.html"
  39. eerror " and download"
  40. eerror "Instant Client for ${MY_PLAT}"
  41. eerror " SQL*Plus: ${MY_A}"
  42. eerror "After downloading, put it in:"
  43. eerror " ${DISTDIR}/"
  44. }
  45. src_install() {
  46. # all binaries go here
  47. local oracle_home=usr/$(get_libdir)/oracle/${PV}/client
  48. into /"${oracle_home}"
  49. dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname)
  50. dobin sqlplus
  51. insinto /"${oracle_home}"/sqlplus/admin
  52. doins glogin.sql
  53. pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die
  54. dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
  55. }