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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20