/[gentoo-x86]/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild
Gentoo

Contents of /dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Nov 15 19:50:09 2012 UTC (7 years, 8 months ago) by haubi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +3 -1 lines
Define QA_PREBUILT, bug#443120.

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild,v 1.6 2012/11/14 17:20:21 ago Exp $
4
5 EAPI="4"
6
7 inherit eutils multilib
8
9 MY_PLAT_x86="Linux x86"
10 MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
11
12 MY_PLAT_amd64="Linux x86-64"
13 MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
14
15 DESCRIPTION="Oracle 11g Instant Client: JDBC supplement"
16 HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
17 SRC_URI="
18 x86? ( ${MY_A_x86} )
19 amd64? ( ${MY_A_amd64} multilib? ( ${MY_A_x86} ) )
20 "
21
22 LICENSE="OTN"
23 SLOT="0"
24 KEYWORDS="amd64 x86"
25 RESTRICT="fetch"
26 IUSE="multilib"
27
28 DEPEND="app-arch/unzip"
29 RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
30
31 S="${WORKDIR}"
32
33 QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
34
35 default_abi() {
36 [[ ${DEFAULT_ABI} == 'default' ]] && echo ${ARCH} || echo ${DEFAULT_ABI}
37 }
38
39 abi_list() {
40 if use multilib; then
41 echo ${MULTILIB_ABIS}
42 else
43 default_abi
44 fi
45 return 0
46 }
47
48 set_abivars() {
49 local abi=$1
50 # platform name
51 MY_PLAT=MY_PLAT_${abi}
52 MY_PLAT=${!MY_PLAT}
53 # runtime distfile
54 MY_A=MY_A_${abi}
55 MY_A=${!MY_A}
56 # abi sourcedir
57 MY_S="${S}/${abi}/instantclient_11_2"
58 # ABI might not need to be set at all
59 [[ -n ${ABI} ]] && MY_ABI=${abi} || MY_ABI=
60 # abi libdir
61 MY_LIBDIR=$(ABI=${MY_ABI} get_libdir)
62 }
63
64 pkg_nofetch() {
65 eerror "Please go to"
66 eerror " ${HOMEPAGE%/*}/index-097480.html"
67 eerror " and download"
68 local abi
69 for abi in $(abi_list)
70 do
71 set_abivars ${abi}
72 eerror "Instant Client for ${MY_PLAT}"
73 eerror " JDBC: ${MY_A}"
74 done
75 eerror "After downloading, put them in:"
76 eerror " ${DISTDIR}/"
77 }
78
79 src_unpack() {
80 local abi
81 for abi in $(abi_list)
82 do
83 set_abivars ${abi}
84 mkdir -p "${MY_S%/*}" || die
85 cd "${MY_S%/*}" || die
86 unpack ${MY_A}
87 done
88 }
89
90 src_install() {
91 # all binaries go here
92 local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
93 into "${oracle_home}"
94
95 local abi
96 for abi in $(abi_list)
97 do
98 set_abivars ${abi}
99 einfo "Installing runtime for ${MY_PLAT} ..."
100
101 cd "${MY_S}" || die
102
103 ABI=${MY_ABI} dolib.so lib*$(get_libname)*
104
105 insinto "${oracle_home}"/${MY_LIBDIR}
106 doins *.jar
107
108 eend $?
109 done
110 }

  ViewVC Help
Powered by ViewVC 1.1.20