diff tool_dependencies.xml @ 2:0e536576294c draft

Experimental shell script solution to downloading appropriate binaries.
author peterjc
date Wed, 14 Aug 2013 09:07:45 -0400
parents 9ff9bfdcd04f
children c85236cd100d
line wrap: on
line diff
--- a/tool_dependencies.xml	Mon Aug 12 06:02:46 2013 -0400
+++ b/tool_dependencies.xml	Wed Aug 14 09:07:45 2013 -0400
@@ -1,27 +1,35 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="boost" version="1.53.0">
-        <repository changeset_revision="a72f8efe9201" name="package_boost_1_53" owner="iuc" prior_installation_required="True" toolshed="http://testtoolshed.g2.bx.psu.edu" />
-    </package>
     <package name="blast+" version="2.2.26+">
         <install version="1.0">
             <actions>
-                <action type="download_by_url">ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.26/ncbi-blast-2.2.26+-src.tar.gz</action>
-                <!-- populate the environment variables from the dependent repos -->
-                <action type="set_environment_for_install">
-                    <repository changeset_revision="f5b13e56a321" name="package_boost_1_53" owner="bgruening" toolshed="http://testtoolshed.g2.bx.psu.edu">
-                        <package name="boost" version="1.53.0" />
-                    </repository>
+                <action type="set_environment">
+                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR</environment_variable>
                 </action>
-                <action type="shell_command">cd c++ &amp;&amp; ./configure --with-boost=$BOOST_ROOT_DIR --prefix=$INSTALL_DIR &amp;&amp; make &amp;&amp; make install</action>
-                <action type="set_environment">
-                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
+		<!-- 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.26+-ia32-linux.tar.gz"; fi &amp;&amp;
+                    if [[ "$(arch)" == "x86_64" ]]; then export FILENAME="ncbi-blast-2.2.26+-x64-linux.tar.gz"; fi &amp;&amp;
+                    if [[ "$(uname)" == "Darwin" ]]; then export FILENAME="ncbi-blast-2.2.26+-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.26/$FILENAME; fi &amp;&amp;
+                    if [[ "$(uname)" == "Darwin" ]]; then curl -O ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.26/$FILENAME; fi &amp;&amp;
+                    tar -zxvf $FILENAME &amp;&amp;
+                </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.26+/bin</source_directory>
+                    <destination_directory>$INSTALL_DIR</destination_directory>
                 </action>
             </actions>
         </install>
         <readme>
-Downloads and compiles BLAST+ from the NCBI, which assumes you have
-all the required build dependencies installed. See:
+Downloads the precompiled 32bit Linux, 64bit Linux, or Mac OS X BLAST+
+binaries from the NCBI, which is faster than performing a local compliation,
+avoids any issues with build dependencies, and is more reproducible between
+installations as there is no variability from the compiler or library versions.
+
+For more details, see:
 http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&amp;PAGE_TYPE=BlastDocs&amp;DOC_TYPE=Download
         </readme>
     </package>