summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2021-04-06 22:56:33 +0200
committerGitHub <noreply@github.com>2021-04-06 13:56:33 -0700
commit0166f7db08969378a4d8cbae7c3814ac9f1b1c94 (patch)
tree26e19e05b5ab15105c0e6f5638bf0a51844ea004
parent23422dcc5934389863e6f568278899f1c680bba4 (diff)
downloadspack-0166f7db08969378a4d8cbae7c3814ac9f1b1c94.tar.gz
spack-0166f7db08969378a4d8cbae7c3814ac9f1b1c94.tar.bz2
spack-0166f7db08969378a4d8cbae7c3814ac9f1b1c94.tar.xz
spack-0166f7db08969378a4d8cbae7c3814ac9f1b1c94.zip
New package: Oracle instant client (#22797)
-rw-r--r--var/spack/repos/builtin/packages/oracle-instant-client/package.py94
1 files changed, 94 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/oracle-instant-client/package.py b/var/spack/repos/builtin/packages/oracle-instant-client/package.py
new file mode 100644
index 0000000000..1d3764e4ca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/oracle-instant-client/package.py
@@ -0,0 +1,94 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+import glob
+
+
+def oracleclient_releases():
+ releases = [
+ {
+ 'version': '21.1.0.0.0',
+ 'components': {
+ 'basic': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-basic-linux.x64-21.1.0.0.0.zip', '9b63e264c01ac54a0f0e61bd638576aed6f04a36b305bcd17847755e7b9855ce'],
+ 'sqlplus': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sqlplus-linux.x64-21.1.0.0.0.zip', '3220f486940e82f1a7825e8f0875729d63abd57cc708f1908e2d5f2163b93937'],
+ 'tools': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-tools-linux.x64-21.1.0.0.0.zip', 'ff652d5bbfeaaa2403cbc13c5667f52e1d648aa2a5c59a50f4c9f84e6d2bba74'],
+ 'sdk': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sdk-linux.x64-21.1.0.0.0.zip', '80a465530a565ed327ab9ae0d9fc067ed42338536c7e8721cf2c26e474f4f75f'],
+ 'jdbc': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-jdbc-linux.x64-21.1.0.0.0.zip', '76c866272712f2b432cc4be675605b22deca02f7a88a292b5ed8d29212d79dc7'],
+ 'odbc': ['https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-odbc-linux.x64-21.1.0.0.0.zip', 'ec7722b522684f0a3f63481573d0eb3537764224eabed6223f33699dd940bf20']
+ }
+ }]
+
+ return releases
+
+
+class OracleInstantClient(Package):
+ """Oracle instant client"""
+
+ homepage = "https://www.oracle.com/database/technologies/instant-client.html"
+ url = "https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-basic-linux.x64-21.1.0.0.0.zip"
+
+ releases = oracleclient_releases()
+ for release in releases:
+ oracle_version = release['version']
+ main_pkg = release['components']['basic']
+ url, sha256 = main_pkg
+ version(oracle_version, sha256=sha256, url=url)
+ for rname, atts in release['components'].items():
+ if rname == 'basic':
+ continue
+ url, sha256 = atts
+ condition = "@{0}".format(oracle_version)
+ resource(name=rname, url=url, sha256=sha256, when=condition, placement=rname)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.include)
+ mkdirp(prefix.lib)
+ mkdirp(prefix.doc)
+
+ for dirn, fns in {'.': ('adrci', 'genezi', 'uidrvci'),
+ 'sqlplus': ('glogin.sql', 'sqlplus'),
+ 'odbc': ('odbc_update_ini.sh', ),
+ 'tools': ('exp', 'expdp', 'imp', 'impdp', 'sqlldr', 'wrc')
+ }.items():
+ for fn in fns:
+ install(join_path(dirn, fn), prefix.bin)
+
+ for fn in glob.glob(join_path(self.stage.source_path, '*.so*')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, '*.jar')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, 'sqlplus', '*.so*')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, 'jdbc', '*.so*')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, 'odbc', '*.so*')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, 'tools', '*.so*')):
+ install(fn, prefix.lib)
+
+ for fn in glob.glob(join_path(self.stage.source_path, 'jdbc', '*.jar')):
+ install(fn, prefix.lib)
+
+ install_tree('network', prefix.lib)
+
+ for dirn, fns in {'.': ('BASIC_LICENSE', 'BASIC_README'),
+ 'sqlplus': ('SQLPLUS_LICENSE', 'SQLPLUS_README'),
+ 'jdbc': ('JDBC_LICENSE', 'JDBC_README'),
+ 'odbc': ('ODBC_LICENSE', 'ODBC_README'),
+ 'sdk': ('SDK_LICENSE', 'SDK_README'),
+ 'tools': ('TOOLS_LICENSE', 'TOOLS_README')
+ }.items():
+ for fn in fns:
+ install(join_path(dirn, fn), prefix.doc)
+
+ install_tree(join_path('odbc', 'help'), prefix.doc)
+ install_tree(join_path('sdk', 'sdk', 'include'), prefix.include)