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

Contents of /dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Dec 26 18:52:18 2006 UTC (13 years, 6 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Cleanup
(Portage version: 2.1.2_rc4-r1)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 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.1-r1.ebuild,v 1.4 2006/04/06 19:12:16 dertobi123 Exp $
4
5 inherit eutils
6
7 MY_P_x86="${PN/oracle-/}-linux32-${PV}-20050713"
8 MY_PSDK_x86="${MY_P_x86/basic/sdk}"
9
10 MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20051025"
11 MY_PSDK_amd64="${MY_P_amd64/basic/sdk}"
12
13 S=${WORKDIR}
14 DESCRIPTION="Oracle 10g client installation for Linux with SDK"
15 HOMEPAGE="http://otn.oracle.com/software/tech/oci/instantclient/htdocs/linuxsoft.html"
16 SRC_URI="x86? ( ${MY_P_x86}.zip ${MY_PSDK_x86}.zip )
17 amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip )"
18
19 LICENSE="OTN"
20 SLOT="${PV}"
21 KEYWORDS="-* ~amd64 ~x86"
22 RESTRICT="fetch"
23 IUSE=""
24
25 DEPEND="app-arch/unzip"
26 RDEPEND="|| ( =sys-libs/libstdc++-v3-3.3* =sys-devel/gcc-3.3* )"
27
28 my_arch() {
29 MY_P=MY_P_${ARCH}
30 export MY_P=${!MY_P}
31 MY_PSDK=MY_PSDK_${ARCH}
32 export MY_PSDK=${!MY_PSDK}
33 }
34
35 pkg_setup() {
36 my_arch
37 }
38
39 pkg_nofetch() {
40 my_arch
41 eerror "Please go to:"
42 eerror " ${HOMEPAGE}"
43 eerror "and download the Basic client package with SDK, which are:"
44 eerror " ${MY_P}.zip"
45 eerror " ${MY_PSDK}.zip"
46 eerror "Then after downloading put them in:"
47 eerror " ${DISTDIR}"
48 }
49
50 src_unpack() {
51 unzip ${DISTDIR}/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip"
52 unzip ${DISTDIR}/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip"
53 }
54
55 src_install() {
56 # library
57 dodir /usr/lib/oracle/${PV}/client/lib
58 cd ${S}/instantclient_10_2
59 insinto /usr/lib/oracle/${PV}/client/lib
60 doins *.jar *.so *.so.10.1
61
62 # fixes symlinks
63 dosym /usr/lib/oracle/${PV}/client/lib/libocci.so.10.1 /usr/lib/oracle/${PV}/client/lib/libocci.so
64 dosym /usr/lib/oracle/${PV}/client/lib/libclntsh.so.10.1 /usr/lib/oracle/${PV}/client/lib/libclntsh.so
65
66 # includes
67 dodir /usr/lib/oracle/${PV}/client/include
68 insinto /usr/lib/oracle/${PV}/client/include
69 cd ${S}/instantclient_10_2/sdk/include
70 doins *.h
71 # link to original location
72 dodir /usr/include/oracle/${PV}/
73 ln -s ${D}/usr/lib/oracle/${PV}/client/include ${D}/usr/include/oracle/${PV}/client
74
75 # share info
76 cd ${S}/instantclient_10_2/sdk/demo
77 dodoc *
78
79 # Add OCI libs to library path
80 dodir /etc/env.d
81 echo "ORACLE_HOME=/usr/lib/oracle/${PV}/client" >> ${D}/etc/env.d/50oracle-instantclient-basic
82 echo "LDPATH=/usr/lib/oracle/${PV}/client/lib" >> ${D}/etc/env.d/50oracle-instantclient-basic
83 echo "C_INCLUDE_PATH=/usr/lib/oracle/${PV}/client/include" >> ${D}/etc/env.d/50oracle-instantclient-basic
84
85 }
86
87 pkg_postinst() {
88 einfo "The Basic client page for Oracle 10g has been installed."
89 einfo "You may also wish to install the oracle-instantclient-jdbc (for"
90 einfo "supplemental JDBC functionality with Oracle) and the"
91 einfo "oracle-instantclient-sqlplus (for running the SQL*Plus application)"
92 einfo "packages as well."
93 einfo
94 einfo "Examples are located in /usr/share/doc/${PF}/"
95 einfo
96 ewarn "ORACLE_HOME (and others) are set in /etc/env.d/50oracle-instantclient-basic"
97 }

  ViewVC Help
Powered by ViewVC 1.1.20