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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jun 18 22:34:51 2008 UTC (12 years, 1 month ago) by wolf31o2
Branch: MAIN
Changes since 1.2: +2 -2 lines
Stable on amd64 wrt bug #225813.
(Portage version: 2.1.5.5)

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.2.0.3-r1.ebuild,v 1.2 2008/06/11 16:05:22 dertobi123 Exp $
4
5 inherit eutils
6
7 MY_P_x86="${PN/oracle-/}-linux32-${PV}-20061115"
8 MY_PSDK_x86="${MY_P_x86/basic/sdk}"
9
10 MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20070103"
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://www.oracle.com/technology/tech/oci/instantclient/index.html"
16 SRC_URI="amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip )
17 x86? ( ${MY_P_x86}.zip ${MY_PSDK_x86}.zip )"
18
19 LICENSE="OTN"
20 SLOT="0"
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 "select your platform and download the"
44 eerror "Basic client package with SDK, which are:"
45 eerror " ${MY_P}.zip"
46 eerror " ${MY_PSDK}.zip"
47 eerror "Then after downloading put them in:"
48 eerror " ${DISTDIR}"
49 }
50
51 src_unpack() {
52 unzip "${DISTDIR}"/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip"
53 unzip "${DISTDIR}"/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip"
54 }
55
56 src_install() {
57 # Patch the SDK makefile
58 epatch "${FILESDIR}"/${P}-makefile.patch
59
60 # SDK makefile
61 dodir /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo
62 cd "${S}"/instantclient_10_2/sdk/demo
63 mv demo.mk demo_xe.mk
64 insinto /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo
65 doins demo_xe.mk
66
67 # library
68 dodir /usr/$(get_libdir)/oracle/${PV}/client/lib
69 cd "${S}"/instantclient_10_2
70 insinto /usr/$(get_libdir)/oracle/${PV}/client/lib
71 doins *.jar *.so *.so.10.1
72
73 # fixes symlinks
74 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so.10.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so
75 dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so.10.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so
76 dosym /usr/$(get_libdir)/oracle/${PV}/client/include /usr/$(get_libdir)/oracle/${PV}/client/rdbms/public
77
78 # includes
79 dodir /usr/$(get_libdir)/oracle/${PV}/client/include
80 insinto /usr/$(get_libdir)/oracle/${PV}/client/include
81 cd "${S}"/instantclient_10_2/sdk/include
82 doins *.h
83 # link to original location
84 dodir /usr/include/oracle/${PV}/
85 ln -s "${D}"/usr/$(get_libdir)/oracle/${PV}/client/include "${D}"/usr/include/oracle/${PV}/client
86
87 # share info
88 cd "${S}"/instantclient_10_2/sdk/demo
89 dodoc *
90
91 # Add OCI libs to library path
92 dodir /etc/env.d
93 echo "ORACLE_HOME=/usr/$(get_libdir)/oracle/${PV}/client" >> "${D}"/etc/env.d/50oracle-instantclient-basic
94 echo "LDPATH=/usr/$(get_libdir)/oracle/${PV}/client/lib" >> "${D}"/etc/env.d/50oracle-instantclient-basic
95 echo "C_INCLUDE_PATH=/usr/$(get_libdir)/oracle/${PV}/client/include" >> "${D}"/etc/env.d/50oracle-instantclient-basic
96 echo "TNS_ADMIN=/etc/oracle/" >> "${D}"/etc/env.d/50oracle-instantclient-basic
97
98 # create path for tnsnames.ora
99 dodir /etc/oracle
100 }
101
102 pkg_postinst() {
103 elog "The Basic client page for Oracle 10g has been installed."
104 elog "You may also wish to install the oracle-instantclient-jdbc (for"
105 elog "supplemental JDBC functionality with Oracle) and the"
106 elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)"
107 elog "packages as well."
108 elog
109 elog "Examples are located in /usr/share/doc/${PF}/"
110 elog
111 elog "oracle-instantclient-* packages aren't installed in different"
112 elog "SLOTs any longer. You may want to uninstall older versions."
113 elog
114 elog "TNS_ADMIN has been set to "${ROOT}"etc/oracle by default, put your"
115 elog "tnsnames.ora there or configure TNS_ADMIN to point to"
116 elog "your user specific configuration."
117 }

  ViewVC Help
Powered by ViewVC 1.1.20