From bb29281a4e1092b605c4ae1019df01f6eef66f3a Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 21 May 2016 17:24:14 +0200 Subject: add activator support --- packages/groovy-bin/build.gradle | 5 +++++ packages/gwt-chromium/build.gradle | 6 +++++- packages/idea-iu/build.gradle | 2 ++ packages/jvmtop/build.gradle | 13 ++++++++----- packages/jvmtop/resources/bin/jvmtop | 5 ----- packages/oraclejdk/build.gradle | 7 +++++++ packages/oraclejdk/oraclejdk7/build.gradle | 3 ++- packages/oraclejdk/oraclejdk8/build.gradle | 2 ++ 8 files changed, 31 insertions(+), 12 deletions(-) delete mode 100755 packages/jvmtop/resources/bin/jvmtop diff --git a/packages/groovy-bin/build.gradle b/packages/groovy-bin/build.gradle index 497bafa..35ef994 100644 --- a/packages/groovy-bin/build.gradle +++ b/packages/groovy-bin/build.gradle @@ -20,4 +20,9 @@ subprojects { download.source "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${project.version}.zip" unzip.from zipTree(download.destFile) } + + activator.bin['groovysh'] = "/opt/${project.name}/bin/groovysh" + activator.bin['groovy'] = "/opt/${project.name}/bin/groovy" + activator.bin['groovyConsole'] = "/opt/${project.name}/bin/groovyConsole" + activator.env['GROOVY_HOME'] = "/opt/${project.name}" } diff --git a/packages/gwt-chromium/build.gradle b/packages/gwt-chromium/build.gradle index 4cb3eeb..f3d0516 100644 --- a/packages/gwt-chromium/build.gradle +++ b/packages/gwt-chromium/build.gradle @@ -96,4 +96,8 @@ ospackage { from(unpackPdfPlugin.outputs.files) { into 'chrome-profile/Default/Extensions/oemmndcbldboiebfnladdacbdfmadadm' } -} \ No newline at end of file +} + +activator.bin['gwt-chrome-persistent'] = "/opt/${project.name}/bin/gwt-chrome-persistent" +activator.bin['gwt-chrome-volatile'] = "/opt/${project.name}/bin/gwt-chrome-volatile" + diff --git a/packages/idea-iu/build.gradle b/packages/idea-iu/build.gradle index 0547dec..54126f7 100644 --- a/packages/idea-iu/build.gradle +++ b/packages/idea-iu/build.gradle @@ -16,6 +16,8 @@ subprojects { from untar.outputs.files } + activator.bin['idea'] = "/opt/${project.name}/bin/idea.sh" + project.afterEvaluate { download.source "https://download.jetbrains.com/idea/ideaIU-${project.version}.tar.gz" untar.from tarTree(download.destFile) diff --git a/packages/jvmtop/build.gradle b/packages/jvmtop/build.gradle index 242bb4c..a37a66c 100644 --- a/packages/jvmtop/build.gradle +++ b/packages/jvmtop/build.gradle @@ -17,11 +17,14 @@ task unpack(type: Copy) { unpack.dependsOn(download) ospackage { - from(fileTree(dir: 'resources')) { - into "/opt/${project.name}" - } - from(unpack.outputs.files) { - into "/opt/${project.name}/lib" + into "/opt/${project.name}" + eachFile { FileCopyDetails fcd -> + if (fcd.name == "jvmtop.sh") { + fcd.mode = 0555 + } + } } } + +activator.bin['jvmtop'] = "/opt/${project.name}/jvmtop.sh" diff --git a/packages/jvmtop/resources/bin/jvmtop b/packages/jvmtop/resources/bin/jvmtop deleted file mode 100755 index 6933c33..0000000 --- a/packages/jvmtop/resources/bin/jvmtop +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -STARTER="`dirname \"$0\"`/../lib/jvmtop.sh" - -/bin/sh $STARTER \ No newline at end of file diff --git a/packages/oraclejdk/build.gradle b/packages/oraclejdk/build.gradle index 6c1e3d6..e2e8c90 100644 --- a/packages/oraclejdk/build.gradle +++ b/packages/oraclejdk/build.gradle @@ -18,4 +18,11 @@ subprojects { project.afterEvaluate { untar.from tarTree(download.destFile) } + + tasks.getByName('createActivator').dependsOn('untar') + tasks.getByName('createActivator').doFirst { + file("${buildDir}/unpacked/dist/bin").list().each { + activator.bin[it] = "/opt/${project.name}/bin/${it}" + } + } } \ No newline at end of file diff --git a/packages/oraclejdk/oraclejdk7/build.gradle b/packages/oraclejdk/oraclejdk7/build.gradle index 901f586..97d6f9a 100644 --- a/packages/oraclejdk/oraclejdk7/build.gradle +++ b/packages/oraclejdk/oraclejdk7/build.gradle @@ -5,4 +5,5 @@ download.sha256sum 'bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab430 ospackage { into '/usr/lib/jvm/java-7-oraclejdk' -} \ No newline at end of file +} +activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-7-oraclejdk' \ No newline at end of file diff --git a/packages/oraclejdk/oraclejdk8/build.gradle b/packages/oraclejdk/oraclejdk8/build.gradle index 10922cd..3af763a 100644 --- a/packages/oraclejdk/oraclejdk8/build.gradle +++ b/packages/oraclejdk/oraclejdk8/build.gradle @@ -6,3 +6,5 @@ download.sha256sum '7e95ad5fa1c75bc65d54aaac9e9986063d0a442f39a53f77909b044cef63 ospackage { into '/usr/lib/jvm/java-8-oraclejdk' } + +activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-8-oraclejdk' -- cgit v1.2.1