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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Nov 12 18:16:24 2010 UTC (9 years, 7 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump

(Portage version: 2.1.9.24/cvs/Linux x86_64)

1 # Copyright 1999-2010 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-r1.ebuild,v 1.1 2010/01/26 19:08:58 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.1
67
68 # fixes symlinks
69 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so.11.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so
70 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so.11.1 /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 # Remove ldap.h, #299562
78 rm ldap.h || die "rm failed"
79 doins *.h
80 # link to original location
81 dodir /usr/include/oracle/${PV}/
82 ln -s "${D}"/usr/$(get_libdir)/oracle/${PV}/client/include "${D}"/usr/include/oracle/${PV}/client
83
84 # share info
85 cd "${S}"/instantclient_11_2/sdk/demo
86 dodoc *
87
88 # Add OCI libs to library path
89 dodir /etc/env.d
90 echo "ORACLE_HOME=/usr/$(get_libdir)/oracle/${PV}/client" >> "${D}"/etc/env.d/50oracle-instantclient-basic
91 echo "LDPATH=/usr/$(get_libdir)/oracle/${PV}/client/lib" >> "${D}"/etc/env.d/50oracle-instantclient-basic
92 echo "C_INCLUDE_PATH=/usr/$(get_libdir)/oracle/${PV}/client/include" >> "${D}"/etc/env.d/50oracle-instantclient-basic
93 echo "TNS_ADMIN=/etc/oracle/" >> "${D}"/etc/env.d/50oracle-instantclient-basic
94
95 # create path for tnsnames.ora
96 dodir /etc/oracle
97 }
98
99 pkg_postinst() {
100 elog "The Basic client package for Oracle 11g has been installed."
101 elog "You may also wish to install the oracle-instantclient-jdbc (for"
102 elog "supplemental JDBC functionality with Oracle) and the"
103 elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)"
104 elog "packages as well."
105 elog
106 elog "Examples are located in /usr/share/doc/${PF}/"
107 elog
108 elog "TNS_ADMIN has been set to "${ROOT}"etc/oracle by default, put your"
109 elog "tnsnames.ora there or configure TNS_ADMIN to point to"
110 elog "your user specific configuration."
111 }

  ViewVC Help
Powered by ViewVC 1.1.20