From 855b88202f7e91f47bd2b285e055546bc8c3f51f Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 1 Dec 2016 13:35:20 +0100 Subject: Add sqlplus --- packages/sqlplus/build.gradle | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 packages/sqlplus/build.gradle (limited to 'packages/sqlplus/build.gradle') diff --git a/packages/sqlplus/build.gradle b/packages/sqlplus/build.gradle new file mode 100644 index 0000000..bb4a12e --- /dev/null +++ b/packages/sqlplus/build.gradle @@ -0,0 +1,36 @@ +version '12.1.0.2.0' + +// load binaries from random internet sources... :( fuck you oracle + +final downloadSqlplus = makeDownloadTask( + url: "http://cmsrep.cern.ch/cms/cpt/Software/download/cms/SOURCES/cache/" + + "cd00b0b11561c3ebd1518f9eaa8b7721/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip", + sha256: 'b52a7fca7279d4e9584674ea6f24464411f62f6ba95a2a16ec92979e99cac4bd') +task unpackSqlplus(type: Copy) { + from zipTree(downloadSqlplus.dest) + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/') + 1) + } +} +unpackSqlplus.dependsOn(downloadSqlplus) + +final downloadClient = makeDownloadTask( + url: "http://202.74.244.40/instantclient-basic-linux.x64-12.1.0.2.0.zip", + sha256: 'c4e1b7201f23bc855782157ebeaaa3635eb6f5f01189bc1d3335bbdadfcb1fbb') +task unpackClient(type: Copy) { + from zipTree(downloadClient.dest) + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/') + 1) + } +} +unpackClient.dependsOn(downloadClient) + +ospackage { + into "/opt/${project.name}" + from unpackSqlplus.outputs.files + from unpackClient.outputs.files +} +activator.bin['sqlplus'] = "LD_LIBRARY_PATH=/opt/${project.name} /opt/${project.name}/sqlplus" + -- cgit v1.2.1