oracle-instantclient-jdbc-11.2.0.4.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils multilib-minimal
  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: JDBC supplement"
  10. HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
  11. SRC_URI="
  12. abi_x86_32? ( ${MY_A_x86} )
  13. abi_x86_64? ( ${MY_A_amd64} )
  14. "
  15. LICENSE="OTN"
  16. SLOT="0"
  17. KEYWORDS="amd64 x86"
  18. RESTRICT="fetch splitdebug"
  19. IUSE=""
  20. DEPEND="app-arch/unzip"
  21. RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
  22. S="${WORKDIR}"
  23. QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
  24. set_my_abivars() {
  25. MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
  26. MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile
  27. # ABI sourcedir
  28. MY_S="${S}/${ABI}/instantclient_11_2"
  29. [[ -n ${MY_PLAT} ]]
  30. }
  31. pkg_nofetch() {
  32. eerror "Please go to"
  33. eerror " ${HOMEPAGE%/*}/index-097480.html"
  34. eerror " and download"
  35. local ABI
  36. for ABI in $(multilib_get_enabled_abis)
  37. do
  38. set_my_abivars || continue
  39. eerror "Instant Client for ${MY_PLAT}"
  40. eerror " JDBC: ${MY_A}"
  41. done
  42. eerror "After downloading, put them in:"
  43. eerror " ${DISTDIR}/"
  44. }
  45. src_unpack() {
  46. local ABI
  47. for ABI in $(multilib_get_enabled_abis)
  48. do
  49. set_my_abivars || continue
  50. mkdir -p "${MY_S%/*}" || die
  51. cd "${MY_S%/*}" || die
  52. unpack ${MY_A}
  53. done
  54. }
  55. src_install() {
  56. # all binaries go here
  57. local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
  58. into "${oracle_home}"
  59. local ABI
  60. for ABI in $(multilib_get_enabled_abis)
  61. do
  62. if ! set_my_abivars; then
  63. elog "Skipping unsupported ABI ${ABI}."
  64. continue
  65. fi
  66. einfo "Installing runtime for ${MY_PLAT} ..."
  67. cd "${MY_S}" || die
  68. dolib.so lib*$(get_libname)*
  69. insinto "${oracle_home}"/$(get_libdir)
  70. doins *.jar
  71. eend $?
  72. done
  73. }