*/*: Specify EAPI=0 explicitly, to ease greps
[gentoo.git] / dev-db / oracle-instantclient-sqlplus / oracle-instantclient-sqlplus-11.2.0.2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=0
5
6 inherit eutils multilib
7
8 MY_P_x86="${PN/oracle-/}-linux32-${PV}.0"
9 MY_P_amd64="${PN/oracle-instantclient-/instantclient-}-linux-x86-64-${PV}.0"
10
11 S="${WORKDIR}"
12 DESCRIPTION="Oracle 11g client installation for Linux: SQL*Plus"
13 HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html"
14 SRC_URI="x86? ( ${MY_P_x86}.zip )
15         amd64? ( ${MY_P_amd64}.zip )"
16
17 LICENSE="OTN"
18 SLOT="0"
19 KEYWORDS="~x86 ~amd64"
20 RESTRICT="fetch"
21 IUSE=""
22
23 RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}"
24 DEPEND="${RDEPEND}
25         app-arch/unzip"
26
27 pkg_setup() {
28         MY_P=MY_P_${ARCH}
29         export MY_P=${!MY_P}
30 }
31
32 pkg_nofetch() {
33         eerror "Please go to:"
34         eerror "  ${HOMEPAGE}"
35         eerror "select your platform and download the"
36         eerror "SQL*Plus package.  Put it in:"
37         eerror "  ${DISTDIR}"
38         eerror "after downloading it."
39 }
40
41 src_unpack() {
42         unzip "${DISTDIR}"/${MY_P}.zip
43 }
44
45 src_install() {
46         dodir /usr/$(get_libdir)/oracle/${PV}/client/lib
47         cd "${S}"/instantclient_11_2
48         insinto /usr/$(get_libdir)/oracle/${PV}/client/lib
49         doins libsqlplus.so libsqlplusic.so
50         insinto /usr/$(get_libdir)/oracle/${PV}/client/sqlplus/admin/
51         doins glogin.sql
52
53         dodir /usr/$(get_libdir)/oracle/${PV}/client/bin
54         cd "${S}"/instantclient_11_2
55         exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin
56         doexe sqlplus
57
58         dodir /usr/bin
59         dosym "${D}"/usr/$(get_libdir)/oracle/${PV}/client/bin/sqlplus /usr/bin/sqlplus
60 }
61
62 pkg_postinst() {
63         elog "The SQL*Plus package for Oracle 11g has been installed."
64         elog "You may wish to install the oracle-instantclient-jdbc (for"
65         elog "the supplemental JDBC functionality) package as well."
66         elog
67         elog "If you have any questions, be sure to read the README:"
68         elog "http://otn.oracle.com/docs/tech/sql_plus/10102/readme_ic.htm"
69 }