forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-db/oracle-instantclient: Revbump, as single package now.
Deprecate the oracle-instantclient-{basic,sqlplus,odbc,jdbc} packages, instead provide as single oracle-instantclient package with USE flags "+sdk +sqlplus odbc jdbc" instead. Since 12c there also is the Workload Replay Client, available with USE flag "tools". Fixes bugs #524922, #527594. Package-Manager: portage-2.2.26
- Loading branch information
Showing
4 changed files
with
356 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
DIST instantclient-basic-linux-12.1.0.2.0.zip 59727331 SHA256 96d210d1ff9575022644a8817696ed9e90374d98cabd2631b7b458689ca7511d SHA512 5d93c72c43ba2ca765209f4c1d518b9e93c80ff33625bf0bc33b974413e2b91ab22681e0922d2148fbfa6b6043fe84eee5334aa398e1ee7b1c2663ff2b3bb235 WHIRLPOOL 78b4902939ccc47540c4524e0a8326ab4a9c302a94c6a85790151ff9d83c400a0298436afab72c2b7b779f9f8606b5b4787fd4dbd496a0add171ae87461881d9 | ||
DIST instantclient-basic-linux.x64-12.1.0.2.0.zip 63352239 SHA256 c4e1b7201f23bc855782157ebeaaa3635eb6f5f01189bc1d3335bbdadfcb1fbb SHA512 e4cbdf40f00521651002f0753ead292b7a33352a7dae5d77635fbdb784451a1b9331ad614326dccdea34ecff3d44ddd0932b83c4bd405e69d95c7decae945f2c WHIRLPOOL 2463abbaa366a20b77b6800262b0b8692ad1e53b8f7e05c542d38e5e893d4e9fb466ef34fb839366991388eda7251654ee5b7fe3020b39692f798bea8e51e83b | ||
DIST instantclient-jdbc-linux-12.1.0.2.0.zip 1571004 SHA256 b40be90a26f27444ee6999ea05d7e62791ff0f01b943d48ceda51167e24f7e1d SHA512 ed3e5f831f1ac7351bd6eb7b3c10a09bba0f1989384ff1f041fdf94a5ca6acbf06e8285283f48731be6ece3dce55d307ac31e8bab57548dca0e3b3056060b5b2 WHIRLPOOL b17c5e25028b3c75719a42b77c43c10c346671632d582c8bd1ce31fa944690b3c883b357674407cb930cc4d7f0ba9054e53cd440842ac8be3951ea1dc32354bb | ||
DIST instantclient-jdbc-linux.x64-12.1.0.2.0.zip 1571639 SHA256 444236c8881b4a6dc98342d8f2d95be5db6c2fa3ae925bdabc1d0cb684b0f20b SHA512 1e6aa33c159d5769d10b16da3c5ff16629dae049c7e7d3ab1504a0ad625968f4d3f655a83ff128bff726c3ed03eab9ef7603c897aad288d1dc4e557c03ac7e2a WHIRLPOOL 3f4adf8b631301f969e23651717be307c94ba2f6f8a7f0e53a086994c3e02a0643bfb69a3b9ec14914f3994cdbc0689e00a3c96f3f65db001e1c3382e380d130 | ||
DIST instantclient-odbc-linux-12.1.0.2.0.zip 1100875 SHA256 bc686e56f544d465797a710af8ac39f49cfee1da13e4124dd080b13e49c6e573 SHA512 ff3b13a338f0acbae07f23d0e54f0ffa803afcda1a798b9cf38ced103201c0698a7240a062fb67af3547c17e906089e236cc3454685ca4645161a8b14414235e WHIRLPOOL 7dce918dcc16fc66f067a84540304948bd27ad38337518c5fa4c708112db3096da7037ac06e165b605f60c2f412f615dd9a511a6d7abaa1e9743e9f5823c3a89 | ||
DIST instantclient-odbc-linux.x64-12.1.0.2.0.zip 1289004 SHA256 ba2b50f8386b971b948b338ba2552b93511a1f515053a990dfb365d9bef35cba SHA512 b6dd02a2566aba66bbdd61e37e00f0c0ec2d466ad969658d4943657642e6e385cb08d0bee3a127b38a7077ec71c8f341aa4696f381e4d9978f807caa1f3ccb91 WHIRLPOOL 4fdda8d10aa3f744cb849f82e21f8d5d6ffc21e907bb0c659962a1d98d7456362108ccdf4b084d741d15177edf6a0233afe917f23adbe7d9af04b6f64a5ddab9 | ||
DIST instantclient-sdk-linux-12.1.0.2.0.zip 667183 SHA256 8a3d609230f02186c85cd39bef1e8b974a239254c5b12ba7e482c5a7c35ffb4a SHA512 fdc0111dba77aa88dc7a39c8d9afbd08c4ffde63890595501915be48a70f6fc623762657a1f3e3b54dd08b0d1e5ce00f99ec5ce40990bb17fab63ae38b986dc9 WHIRLPOOL ab4b2406d503381e5f0f878ebec7d03ff3fa748a0f7aa975dda567223327092452543c5a5568b0eea060d998f209092d7bc2d7d227ddd134cd6d259db5377a90 | ||
DIST instantclient-sdk-linux.x64-12.1.0.2.0.zip 667174 SHA256 ba4b1b96b9f00bc36682542df575f1d52717f6ad48436f50c85b2e87b3a6961c SHA512 451918e34c4e41dcaea6d678cf10a20a3fb80be5c060aa1a2890f2eb528e6e4982bfd758598eaa115cd367cde0468f7f0f811bac2ef28671075868857eaf9f2e WHIRLPOOL e0cc5019eebf25c3db8debd207c85907937698a80e4ccea7c4eae0bde3c58bdfecb2d03f915dda870cc1d579146594d2720a7338a4466529bae20dd1a4e15aca | ||
DIST instantclient-sqlplus-linux-12.1.0.2.0.zip 828190 SHA256 03062efdb88423342657a679760581af14d936a897647bddcf248453bb01105f SHA512 e521f141f0bb4fe62bda6da389a9c1038be879f1456500a9e70ac0a41d4f35cf2051181a03223521aa24ee06a33b67614d3afd91f01099afa0081f2771876d43 WHIRLPOOL cd03b648dcc9340b09501b9af9da0d7c493983e304413fcc4a882524919a693a86d2d640009b9da125424c0dd9302546c2a5deeb569401c642b35a941d76e017 | ||
DIST instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 861284 SHA256 b52a7fca7279d4e9584674ea6f24464411f62f6ba95a2a16ec92979e99cac4bd SHA512 ad0af692bcae1231b58c7ea55fa79d85c7a5c9875a805565b1b5956ed30e608d753ac9210f6169ab3ff4e42ac2f1d871ccff47bd2656f7684925136fef1f30c2 WHIRLPOOL bad31c1135377f191adfb95861b171f286f2564023387c7d5fbb897624e0e15784157a052784985fcf42cb9e5d500067e71d1a8a6858ed65a179f6b4cc6c78ca | ||
DIST instantclient-tools-linux-12.1.0.2.0.zip 187088 SHA256 2c73b8668ec5c99ec777110a5e33744540b8d394dcb934430d39dc507373126a SHA512 37a9eb3e2fdbbbf32f0fb5d017209db1b62d54efe48a875625e9d6162ea894d93d144358b2360989fa71704b346f86b36f1640a5c98f8aac7c1e6853b2d078fd WHIRLPOOL 156b434fc181cbd7832fc7646bb5c6ae73c69a748b8d76dd36481aea72db211d4524d290662cf0506f0fdc811035bb39eaf2a1a087b9de50cb943e5289d5ffe9 | ||
DIST instantclient-tools-linux.x64-12.1.0.2.0.zip 203511 SHA256 cdddadf2fb7bba406a397e0dd47b53bffb9326265b874d1b17507c98a38afa16 SHA512 f18ca11300fc20925c72122d03fc00402b9a52b39f7f70cfd3fa97264a1a2a173e7f77059affba98e897546e05c6ac1e3a546ce1c7e63ef049130496d346342b WHIRLPOOL d98d728b917cdc368e859ec358ef35c1284b4a8e49b2e4d909a0d363bdaea10e80622dca19977afa3030d7930d2d1b37ce1983eb27da09f909c9c0a636b82206 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Fake demo_xe.mk found in Oracle eXpress Edition, | ||
known by CPAN DBD::Oracle (bug#165834). | ||
This provides absolute paths for headers and libraries. | ||
|
||
Paranoia drops those REMOVE lines. | ||
--- sdk/demo/demo.mk | ||
+++ sdk/demo/demo.mk | ||
@@ -28,8 +28,9 @@ | ||
CC=/opt/SunProd/SUNWspro6.1/bin/CC | ||
cc=/opt/SunProd/SUNWspro6.1/bin/cc | ||
|
||
-ICINCHOME=../ | ||
-ICLIBHOME=../../ | ||
+LIBDIR=lib | ||
+ICINCHOME=$(ORACLE_HOME)/ | ||
+ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR) | ||
ICLIBPATH=-L$(ICLIBHOME) | ||
THREADLIBS=-lthread | ||
CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS) | ||
@@ -64,18 +65,18 @@ | ||
all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO) | ||
|
||
buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS) | ||
- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT) | ||
- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT) | ||
+# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT) | ||
+# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT) | ||
$(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB) | ||
- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
|
||
buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS) | ||
- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT) | ||
- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT) | ||
+# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT) | ||
+# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT) | ||
$(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB) | ||
- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
|
||
$(OCCIDEMO): | ||
$(MAKE) -f $(MAKEFILE) buildocci [email protected] EXE=$@ | ||
@@ -93,8 +94,8 @@ | ||
|
||
cleancache: | ||
$(REMOVE) $(CACHEDIR) | ||
- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) | ||
+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) | ||
|
||
clean: $(CLNCACHE) | ||
$(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<longdescription> | ||
Free, light-weight and easily installed Oracle Database libraries | ||
and SDKs for building and connecting client applications to local | ||
or remote Oracle Databases. | ||
</longdescription> | ||
<use> | ||
<flag name="jdbc">Support for XA, Internationalization, and RowSet operations under JDBC. | ||
</flag> | ||
<flag name="odbc">Libraries for enabling ODBC applications. | ||
</flag> | ||
<flag name="sdk">Header files and an example makefile for developing Oracle applications. | ||
</flag> | ||
<flag name="sqlplus">Libraries and executable for running SQL*Plus. | ||
</flag> | ||
<flag name="tools">Workload Replay Client. | ||
</flag> | ||
</use> | ||
</pkgmetadata> |
263 changes: 263 additions & 0 deletions
263
dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,263 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI="6" | ||
|
||
inherit eutils versionator multilib-minimal | ||
|
||
MY_PVM=$(get_version_component_range 1-2) | ||
|
||
MY_PLAT_x86="Linux x86" | ||
MY_BITS_x86=32 | ||
MY_A_x86="${PN/oracle-/}-basic-linux-${PV}.0.zip" | ||
MY_A_x86_sdk="${MY_A_x86/basic/sdk}" | ||
MY_A_x86_odbc="${MY_A_x86/basic/odbc}" | ||
MY_A_x86_jdbc="${MY_A_x86/basic/jdbc}" | ||
MY_A_x86_sqlplus="${MY_A_x86/basic/sqlplus}" | ||
MY_A_x86_tools="${MY_A_x86/basic/tools}" | ||
|
||
MY_PLAT_amd64="Linux x86-64" | ||
MY_BITS_amd64=64 | ||
MY_A_amd64="${PN/oracle-}-basic-linux.x64-${PV}.0.zip" | ||
MY_A_amd64_sdk="${MY_A_amd64/basic/sdk}" | ||
MY_A_amd64_odbc="${MY_A_amd64/basic/odbc}" | ||
MY_A_amd64_jdbc="${MY_A_amd64/basic/jdbc}" | ||
MY_A_amd64_sqlplus="${MY_A_amd64/basic/sqlplus}" | ||
MY_A_amd64_tools="${MY_A_amd64/basic/tools}" | ||
|
||
DESCRIPTION="Oracle 12c Instant Client with SDK" | ||
HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" | ||
SRC_URI=" | ||
abi_x86_32? ( | ||
${MY_A_x86} | ||
odbc? ( ${MY_A_x86_odbc} ) | ||
jdbc? ( ${MY_A_x86_jdbc} ) | ||
!abi_x86_64? ( | ||
sdk? ( ${MY_A_x86_sdk} ) | ||
sqlplus? ( ${MY_A_x86_sqlplus} ) | ||
tools? ( ${MY_A_x86_tools} ) | ||
) ) | ||
abi_x86_64? ( | ||
${MY_A_amd64} | ||
odbc? ( ${MY_A_amd64_odbc} ) | ||
jdbc? ( ${MY_A_amd64_jdbc} ) | ||
sdk? ( ${MY_A_amd64_sdk} ) | ||
sqlplus? ( ${MY_A_amd64_sqlplus} ) | ||
tools? ( ${MY_A_amd64_tools} ) | ||
) | ||
" | ||
|
||
LICENSE="OTN" | ||
SLOT="0/${MY_PVM}" | ||
KEYWORDS="~amd64 ~x86" | ||
RESTRICT="fetch splitdebug" | ||
IUSE="jdbc odbc +sdk +sqlplus tools" | ||
|
||
DEPEND="app-arch/unzip" | ||
RDEPEND=" | ||
>=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}] | ||
!<dev-db/oracle-instantclient-basic-12 | ||
!<dev-db/oracle-instantclient-odbc-12 | ||
!<dev-db/oracle-instantclient-jdbc-12 | ||
!<dev-db/oracle-instantclient-sqlplus-12 | ||
" | ||
|
||
S="${WORKDIR}" | ||
|
||
QA_PREBUILT="usr/lib*/oracle/*/client/lib*/lib*" | ||
|
||
DOCS=( "demo/*" ) | ||
|
||
PATCHES=( "${FILESDIR}"/12.1.0.2-makefile.patch ) | ||
|
||
set_my_abivars() { | ||
S="${WORKDIR}/${ABI}/instantclient_$( | ||
replace_version_separator 1 "_" "${MY_PVM}" | ||
)" | ||
|
||
local abi=${ABI} | ||
[[ ${abi} == 'default' ]] && abi=${ARCH} | ||
MY_PLAT=MY_PLAT_${abi} ; MY_PLAT=${!MY_PLAT} # platform name | ||
MY_BITS=MY_BITS_${abi} ; MY_BITS=${!MY_BITS} # platform bitwidth | ||
MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile | ||
MY_A_sdk=MY_A_${abi}_sdk ; MY_A_sdk=${!MY_A_sdk} # sdk distfile | ||
MY_A_odbc=MY_A_${abi}_odbc ; MY_A_odbc=${!MY_A_odbc} # odbc distfile | ||
MY_A_jdbc=MY_A_${abi}_jdbc ; MY_A_jdbc=${!MY_A_jdbc} # jdbc distfile | ||
MY_A_sqlplus=MY_A_${abi}_sqlplus; MY_A_sqlplus=${!MY_A_sqlplus} # sqlplus distfile | ||
MY_A_tools=MY_A_${abi}_tools ; MY_A_tools=${!MY_A_tools} # tools distfile | ||
|
||
[[ -n ${MY_PLAT} ]] | ||
} | ||
|
||
oic_distfile_status() { | ||
if [[ -r ${DISTDIR}/${1} ]]; then | ||
echo "already here" | ||
else | ||
echo "still absent" | ||
fi | ||
} | ||
|
||
pkg_nofetch() { | ||
eerror "Please go to" | ||
eerror " ${HOMEPAGE%/*}/index-097480.html" | ||
eerror " and download" | ||
local ABI | ||
for ABI in $(multilib_get_enabled_abis) | ||
do | ||
set_my_abivars || continue | ||
eerror "Instant Client for ${MY_PLAT}" | ||
eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}" | ||
use odbc && | ||
eerror " ODBC: ($(oic_distfile_status ${MY_A_odbc})) ${MY_A_odbc}" | ||
use jdbc && | ||
eerror " JDBC: ($(oic_distfile_status ${MY_A_jdbc})) ${MY_A_jdbc}" | ||
if multilib_is_native_abi; then | ||
use sdk && | ||
eerror " SDK: ($(oic_distfile_status ${MY_A_sdk})) ${MY_A_sdk}" | ||
use sqlplus && | ||
eerror " SQL*Plus: ($(oic_distfile_status ${MY_A_sqlplus})) ${MY_A_sqlplus}" | ||
use tools && | ||
eerror " WRC: ($(oic_distfile_status ${MY_A_tools})) ${MY_A_tools}" | ||
fi | ||
done | ||
eerror "After downloading these files (for *all* shown architectures), put them in:" | ||
eerror " ${DISTDIR}/" | ||
} | ||
|
||
src_unpack() { | ||
local ABI | ||
for ABI in $(multilib_get_enabled_abis) | ||
do | ||
set_my_abivars || continue | ||
mkdir "${WORKDIR}"/${ABI} || die | ||
cd "${WORKDIR}"/${ABI} || die | ||
unpack ${MY_A} | ||
use odbc && unpack ${MY_A_odbc} | ||
use jdbc && unpack ${MY_A_jdbc} | ||
if multilib_is_native_abi; then | ||
use sdk && unpack ${MY_A_sdk} | ||
use sqlplus && unpack ${MY_A_sqlplus} | ||
use tools && unpack ${MY_A_tools} | ||
fi | ||
done | ||
} | ||
|
||
# silence configure&compile messages from multilib-minimal | ||
src_configure() { :; } | ||
src_compile() { :; } | ||
|
||
src_install() { | ||
# all binaries go here | ||
local oracle_home=/usr/$(ABI= get_libdir)/oracle/${MY_PVM}/client | ||
into "${oracle_home}" | ||
|
||
local ldpath= ABI | ||
for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI | ||
do | ||
if ! set_my_abivars; then | ||
elog "Skipping unsupported ABI ${ABI}." | ||
continue | ||
fi | ||
einfo "Installing runtime for ${MY_PLAT} ..." | ||
|
||
cd "${S}" || die | ||
|
||
# shared libraries | ||
dolib.so lib*$(get_libname)* | ||
|
||
# ensure to be linkable | ||
[[ -e libocci$(get_libname) ]] || | ||
dosym libocci$(get_libname ${MY_PVM}) \ | ||
"${oracle_home}"/$(get_libdir)/libocci$(get_libname) | ||
[[ -e libclntsh$(get_libname) ]] || | ||
dosym libclntsh$(get_libname ${MY_PVM}) \ | ||
"${oracle_home}"/$(get_libdir)/libclntsh$(get_libname) | ||
|
||
# java archives | ||
insinto "${oracle_home}"/$(get_libdir) | ||
doins *.jar | ||
|
||
# runtime library path | ||
ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir) | ||
|
||
eend $? | ||
done | ||
|
||
# ensure ORACLE_HOME/lib exists | ||
[[ -e ${ED}${oracle_home}/lib ]] || | ||
dosym $(get_libdir) "${oracle_home}"/lib | ||
|
||
einfo "Installing SDK ..." | ||
cd "${S}"/sdk || die | ||
|
||
# SDK makefile, for #165834 | ||
# As we change the relative filesystem layout compared | ||
# to vanilla instantclient.zip content, it feels easier | ||
# to fake the layout found in Oracle eXpress Edition. | ||
# Both layouts are known to DBD::Oracle (cpan). | ||
insinto "${oracle_home}"/rdbms/demo | ||
newins demo/demo.mk demo_xe.mk | ||
|
||
# Remove ldap.h, #299562 | ||
rm include/ldap.h || die | ||
# DBD::Oracle needs rdbms/public as real directory | ||
insinto "${oracle_home}"/rdbms/public | ||
doins include/*.h | ||
dosym rdbms/public "${oracle_home}"/include | ||
# ruby-oci8 expects the headers here | ||
dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${MY_PVM}/client | ||
|
||
eend $? | ||
|
||
einstalldocs | ||
|
||
# create path for tnsnames.ora | ||
insinto /etc/oracle | ||
doins "${FILESDIR}"/tnsnames.ora.sample | ||
|
||
# Add OCI libs to library path | ||
{ | ||
echo "# ${EPREFIX}/etc/env.d/50${PN}" | ||
echo "# Do not edit this file, but 99${PN} instead" | ||
echo | ||
echo "ORACLE_HOME=${EPREFIX}${oracle_home}" | ||
echo "LDPATH=${ldpath}" | ||
echo "TNS_ADMIN=/etc/oracle/" | ||
} > "${T}"/50${PN} | ||
|
||
doenvd "${T}"/50${PN} | ||
} | ||
|
||
pkg_preinst() { | ||
if [[ -r ${EROOT}/etc/env.d/99${PN} ]]; then | ||
cp "${EROOT}/etc/env.d/99${PN}" "${ED}/etc/env.d/" || die | ||
else | ||
{ | ||
echo "# ${EPREFIX}/etc/env.d/99${PN}" | ||
echo "# Configure system-wide defaults for your Oracle Instant Client here" | ||
echo | ||
echo "#$(grep '^ORACLE_HOME=' "${ED}/etc/env.d/50${PN}")" | ||
echo "#$(grep '^TNS_ADMIN=' "${ED}/etc/env.d/50${PN}")" | ||
echo "#NLS_LANG=" | ||
} > "${ED}/etc/env.d/99${PN}" | ||
fi | ||
} | ||
|
||
pkg_postinst() { | ||
elog "${P} does not provide an sqlnet.ora" | ||
elog "configuration file, redirecting oracle diagnostics for database-" | ||
elog "and network-issues into ~USER/oradiag_USER/ instead." | ||
elog "It should be safe to ignore this message in sqlnet.log there:" | ||
elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []" | ||
elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference." | ||
elog "If you want to directly analyse low-level debug info or don't want" | ||
elog "to see it at all, so you really need an sqlnet.ora file, please" | ||
elog "consult http://search.oracle.com/search/search?q=sqlnet.ora" | ||
elog "" | ||
elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default," | ||
elog "put your tnsnames.ora there or configure TNS_ADMIN" | ||
elog "to point to your user specific configuration." | ||
ewarn "Please re-source your shell settings for ORACLE_HOME" | ||
ewarn " changes, such as: source /etc/profile" | ||
} |