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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri May 2 19:41:53 2008 UTC (12 years, 2 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Cleanup, set TNS_ADMIN and add information on where to put tnsnames.ora, #215100
(Portage version: 2.1.5_rc6)

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

  ViewVC Help
Powered by ViewVC 1.1.20