changeset 1:972e154502eb draft

Updated to use os/arch specific actions
author peterjc
date Mon, 18 Nov 2013 05:42:08 -0500
parents ef3b30d6bfe8
children 3efd4086a97d
files tool_dependencies.xml
diffstat 1 files changed, 54 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/tool_dependencies.xml	Mon Oct 07 09:37:43 2013 -0400
+++ b/tool_dependencies.xml	Mon Nov 18 05:42:08 2013 -0500
@@ -1,28 +1,63 @@
-<?xml version="1.0"?>
+<?xml version='1.0' encoding='utf-8'?>
 <tool_dependency>
     <package name="blast+" version="2.2.27">
         <install version="1.0">
-            <actions>
+            <actions_group>
+                <!-- Download the binaries for BLAST+ compatible with 64-bit OSX. -->
+                <actions os="darwin" architecture="x86_64">
+                    <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/ncbi-blast-2.2.27+-universal-macosx.tar.gz</action>
+                    <action type="move_directory_files">
+                         <source_directory>bin</source_directory>
+                         <destination_directory>$INSTALL_DIR</destination_directory>
+                     </action>
+                </actions>
+                <!-- Download the binaries for BLAST+ compatible with 32-bit OSX. -->
+                <actions os="darwin" architecture="i386">
+                    <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/ncbi-blast-2.2.27+-universal-macosx.tar.gz</action>
+                    <action type="move_directory_files">
+                        <source_directory>bin</source_directory>
+                        <destination_directory>$INSTALL_DIR</destination_directory>
+                    </action>
+                </actions>
+                <!-- Download the binaries for BLAST+ compatible with 64-bit Linux. -->
+                <actions os="linux" architecture="x86_64">
+                    <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/ncbi-blast-2.2.27+-x64-linux.tar.gz</action>
+                    <action type="move_directory_files">
+                        <source_directory>bin</source_directory>
+                        <destination_directory>$INSTALL_DIR</destination_directory>
+                    </action>
+                </actions>
+                <!-- Download the binaries for BLAST+ compatible with 32-bit Linux (i386). -->
+                <actions os="linux" architecture="i386">
+                    <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/ncbi-blast-2.2.27+-ia32-linux.tar.gz</action>
+                    <action type="move_directory_files">
+                        <source_directory>bin</source_directory>
+                        <destination_directory>$INSTALL_DIR</destination_directory>
+                    </action>
+                </actions>
+                <!-- Download the binaries for BLAST+ compatible with 32-bit Linux (i686). -->
+                <actions os="linux" architecture="i686">
+                    <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/ncbi-blast-2.2.27+-ia32-linux.tar.gz</action>
+                    <action type="move_directory_files">
+                        <source_directory>bin</source_directory>
+                        <destination_directory>$INSTALL_DIR</destination_directory>
+                    </action>
+                </actions>
+                <!-- This actions tag is only processed if none of the above tags resulted in a successful installation. -->
+                <actions>
+                    <action type="shell_command">echo ERROR: Automated installation on your operating system and CPU architecture combination is not yet supported.</action>
+                    <action type="shell_command">echo Your machine details (the output from 'uname' and 'arch'):</action>
+                    <action type="shell_command">uname</action>
+                    <action type="shell_command">arch</action>
+                    <action type="shell_command">echo Please report this via https://github.com/peterjc/galaxy_blast/issues - thank you!</action>
+                    <action type="shell_command">false</action>
+		    <!-- The 'false' command will return an error, so Galaxy should treat this as a failed install -->
+                </actions>
+                <!-- The $PATH environment variable is only set if one of the above <actions> tags resulted in a successful installation. -->
                 <action type="set_environment">
                     <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR</environment_variable>
                 </action>
-                <!-- arch under Linux 32bit includes some variants like i386 and i686, so use as default -->
-                <action type="shell_command">
-                    if [[ "$(uname)" == "Linux" ]]; then export FILENAME="ncbi-blast-2.2.27+-ia32-linux.tar.gz"; fi &amp;&amp;
-                    if [[ "$(arch)" == "x86_64" ]]; then export FILENAME="ncbi-blast-2.2.27+-x64-linux.tar.gz"; fi &amp;&amp;
-                    if [[ "$(uname)" == "Darwin" ]]; then export FILENAME="ncbi-blast-2.2.27+-universal-macosx.tar.gz"; fi &amp;&amp;
-                    echo Fetching $FILENAME &amp;&amp;
-                    if [[ "$(uname)" == "Linux" ]]; then wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/$FILENAME; fi &amp;&amp;
-                    if [[ "$(uname)" == "Darwin" ]]; then curl -O ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.27/$FILENAME; fi &amp;&amp;
-                    tar -zxvf $FILENAME &amp;&amp;
-                    echo Downloaded and decompressed
-                </action>
-                <!-- move the binaries to the installation directory which is now on the $PATH -->
-                <action type="move_directory_files">
-                    <source_directory>ncbi-blast-2.2.27+/bin</source_directory>
-                    <destination_directory>$INSTALL_DIR</destination_directory>
-                </action>
-            </actions>
+            </actions_group>
         </install>
         <readme>
 Downloads the precompiled 32bit Linux, 64bit Linux, or Mac OS X BLAST+