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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jan 26 19:08:58 2010 UTC (10 years, 5 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Revbump(s), fixes #299347, #299558 and #299562
(Portage version: 2.2_rc61/cvs/Linux x86_64)

1 # Copyright 1999-2009 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-11.2.0.0.2.ebuild,v 1.2 2009/12/31 10:48:40 dertobi123 Exp $
4
5 inherit eutils
6
7 MY_PBASE_amd64="${PN/oracle-instantclient-/oracle-instantclient11.2-}-${PV}-1.x86_64"
8 MY_P_amd64="${PN/oracle-instantclient-/oracle-instantclient11.2-}-${PV}-1.x86_64"
9 MY_PSDK_amd64="${MY_PBASE_amd64/basic/devel}"
10
11 DESCRIPTION="Oracle 11g client installation for Linux with SDK"
12 HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html"
13 SRC_URI="amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip )"
14
15 LICENSE="OTN"
16 SLOT="0"
17 KEYWORDS="-* ~amd64"
18 RESTRICT="fetch"
19 IUSE=""
20
21 DEPEND="app-arch/unzip"
22 RDEPEND="dev-libs/libaio"
23
24 S="${WORKDIR}"
25
26 my_arch() {
27 MY_P=MY_P_${ARCH}
28 export MY_P=${!MY_P}
29 MY_PSDK=MY_PSDK_${ARCH}
30 export MY_PSDK=${!MY_PSDK}
31 }
32
33 pkg_setup() {
34 my_arch
35 }
36
37 pkg_nofetch() {
38 my_arch
39 eerror "Please go to:"
40 eerror " ${HOMEPAGE}"
41 eerror "select your platform and download the"
42 eerror "Basic client package with SDK, which are:"
43 eerror " ${MY_P}.zip"
44 eerror " ${MY_PSDK}.zip"
45 eerror "Then after downloading put them in:"
46 eerror " ${DISTDIR}"
47 }
48
49 src_unpack() {
50 unzip "${DISTDIR}"/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip"
51 unzip "${DISTDIR}"/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip"
52 }
53
54 src_install() {
55 # SDK makefile
56 dodir /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo
57 cd "${S}"/instantclient_11_2/sdk/demo
58 mv demo.mk demo_xe.mk
59 insinto /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo
60 doins demo_xe.mk
61
62 # library
63 dodir /usr/$(get_libdir)/oracle/${PV}/client/lib
64 cd "${S}"/instantclient_11_2
65 insinto /usr/$(get_libdir)/oracle/${PV}/client/lib
66 doins *.jar *.so *.so.11.2
67
68 # fixes symlinks
69 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so.11.2 /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so
70 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so.11.2 /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so
71 dosym /usr/$(get_libdir)/oracle/${PV}/client/include /usr/$(get_libdir)/oracle/${PV}/client/rdbms/public
72
73 # includes
74 dodir /usr/$(get_libdir)/oracle/${PV}/client/include
75 insinto /usr/$(get_libdir)/oracle/${PV}/client/include
76 cd "${S}"/instantclient_11_2/sdk/include
77 doins *.h
78 # link to original location
79 dodir /usr/include/oracle/${PV}/
80 ln -s "${D}"/usr/$(get_libdir)/oracle/${PV}/client/include "${D}"/usr/include/oracle/${PV}/client
81
82 # share info
83 cd "${S}"/instantclient_11_2/sdk/demo
84 dodoc *
85
86 # Add OCI libs to library path
87 dodir /etc/env.d
88 echo "ORACLE_HOME=/usr/$(get_libdir)/oracle/${PV}/client" >> "${D}"/etc/env.d/50oracle-instantclient-basic
89 echo "LDPATH=/usr/$(get_libdir)/oracle/${PV}/client/lib" >> "${D}"/etc/env.d/50oracle-instantclient-basic
90 echo "C_INCLUDE_PATH=/usr/$(get_libdir)/oracle/${PV}/client/include" >> "${D}"/etc/env.d/50oracle-instantclient-basic
91 echo "TNS_ADMIN=/etc/oracle/" >> "${D}"/etc/env.d/50oracle-instantclient-basic
92
93 # create path for tnsnames.ora
94 dodir /etc/oracle
95 }
96
97 pkg_postinst() {
98 elog "The Basic client package for Oracle 11g has been installed."
99 elog "You may also wish to install the oracle-instantclient-jdbc (for"
100 elog "supplemental JDBC functionality with Oracle) and the"
101 elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)"
102 elog "packages as well."
103 elog
104 elog "Examples are located in /usr/share/doc/${PF}/"
105 elog
106 elog "TNS_ADMIN has been set to "${ROOT}"etc/oracle by default, put your"
107 elog "tnsnames.ora there or configure TNS_ADMIN to point to"
108 elog "your user specific configuration."
109 }

  ViewVC Help
Powered by ViewVC 1.1.20