/[gentoo-x86]/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.2.ebuild
Gentoo

Contents of /dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Mar 25 16:40:53 2007 UTC (13 years, 3 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
bugs #165834 and #169541
(Portage version: 2.1.2.2)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.2.ebuild,v 1.7 2007/01/31 13:49:45 genone Exp $
4
5 inherit eutils
6
7 MY_P_x86="${PN/oracle-/}-linux32-${PV}-20060331"
8 MY_PSDK_x86="${MY_P_x86/basic/sdk}"
9
10 MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20060228"
11 MY_PSDK_amd64="${MY_P_amd64/basic/sdk}"
12
13 MY_P_ppc="${PN/oracle-/}-linuxppc32-${PV}-20060327"
14 MY_PSDK_ppc="${MY_P_ppc/basic/sdk}"
15
16 MY_P_ppc64="${PN/oracle-/}-linuxppc-${PV}-20060327"
17 MY_PSDK_ppc64="${MY_P_ppc64/basic/sdk}"
18
19 S=${WORKDIR}
20 DESCRIPTION="Oracle 10g client installation for Linux with SDK"
21 HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html"
22 SRC_URI="x86? ( ${MY_P_x86}.zip ${MY_PSDK_x86}.zip )
23 amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip )
24 ppc? ( ${MY_P_ppc}.zip ${MY_PSDK_ppc}.zip )
25 ppc64? ( ${MY_P_ppc64}.zip ${MY_PSDK_ppc64}.zip )"
26
27 LICENSE="OTN"
28 SLOT="${PV}"
29 KEYWORDS="-* ~amd64 ~ppc ~ppc64 ~x86"
30 RESTRICT="fetch"
31 IUSE=""
32
33 DEPEND="app-arch/unzip"
34 RDEPEND="|| ( =sys-libs/libstdc++-v3-3.3* =sys-devel/gcc-3.3* )"
35
36 my_arch() {
37 MY_P=MY_P_${ARCH}
38 export MY_P=${!MY_P}
39 MY_PSDK=MY_PSDK_${ARCH}
40 export MY_PSDK=${!MY_PSDK}
41 }
42
43 pkg_setup() {
44 my_arch
45 }
46
47 pkg_nofetch() {
48 my_arch
49 eerror "Please go to:"
50 eerror " ${HOMEPAGE}"
51 eerror "select your platform and download the"
52 eerror "Basic client package with SDK, which are:"
53 eerror " ${MY_P}.zip"
54 eerror " ${MY_PSDK}.zip"
55 eerror "Then after downloading put them in:"
56 eerror " ${DISTDIR}"
57 }
58
59 src_unpack() {
60 unzip ${DISTDIR}/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip"
61 unzip ${DISTDIR}/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip"
62 }
63
64 src_install() {
65 # library
66 dodir /usr/lib/oracle/${PV}/client/lib
67 cd ${S}/instantclient_10_2
68 insinto /usr/lib/oracle/${PV}/client/lib
69 doins *.jar *.so *.so.10.1
70
71 # fixes symlinks
72 dosym /usr/lib/oracle/${PV}/client/lib/libocci.so.10.1 /usr/lib/oracle/${PV}/client/lib/libocci.so
73 dosym /usr/lib/oracle/${PV}/client/lib/libclntsh.so.10.1 /usr/lib/oracle/${PV}/client/lib/libclntsh.so
74
75 # includes
76 dodir /usr/lib/oracle/${PV}/client/include
77 insinto /usr/lib/oracle/${PV}/client/include
78 cd ${S}/instantclient_10_2/sdk/include
79 doins *.h
80 # link to original location
81 dodir /usr/include/oracle/${PV}/
82 ln -s ${D}/usr/lib/oracle/${PV}/client/include ${D}/usr/include/oracle/${PV}/client
83
84 # share info
85 cd ${S}/instantclient_10_2/sdk/demo
86 dodoc *
87
88 # Add OCI libs to library path
89 dodir /etc/env.d
90 echo "ORACLE_HOME=/usr/lib/oracle/${PV}/client" >> ${D}/etc/env.d/50oracle-instantclient-basic
91 echo "LDPATH=/usr/lib/oracle/${PV}/client/lib" >> ${D}/etc/env.d/50oracle-instantclient-basic
92 echo "C_INCLUDE_PATH=/usr/lib/oracle/${PV}/client/include" >> ${D}/etc/env.d/50oracle-instantclient-basic
93 }
94
95 pkg_postinst() {
96 elog "The Basic client page for Oracle 10g has been installed."
97 elog "You may also wish to install the oracle-instantclient-jdbc (for"
98 elog "supplemental JDBC functionality with Oracle) and the"
99 elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)"
100 elog "packages as well."
101 elog
102 elog "Examples are located in /usr/share/doc/${PF}/"
103 }

  ViewVC Help
Powered by ViewVC 1.1.20