In the following code substitute the actual release name for <release>.

Linux

 source ~/<release>-build
 cd /export/data/star
 git clone git://github.com/Starlink/starlink.git starlink-<release>
 cd starlink-<release>
 git checkout <release>
 ./bootstrap
 make configure-deps
 ./configure -C
 make world
 make componentset.html

OS X

 source ~/<release>-build
 export DYLD_LIBRARY_PATH=/star/lib
 cd development
 git clone git://github.com/Starlink/starlink.git starlink-<release>
 cd starlink-<release>
 git checkout <release>
 ./bootstrap
 make configure-deps
 ./configure -C
 make world
 make componentset.html

STARPERL

The Perl modules installer can be found in the perlmods subdirectory.

When creating a release branch, use the module2dist.sh script to write the current version of each Perl module and commit this to the branch. You can do this first on any OS. To avoid the problem with ExtUtils::F77 mentioned below, when making the Linux build, install the module from scubadev:/export/data/star/ExtUtils-F77-prefer-gfortran and delete it from the cpan.deps or explicit-cpan.deps file so cpanm doesn't update it. Then you won't need to rebuild perl-NDF again later.

Change into the directory and for more information, see the instructions in the README.

 cd thirdparty/perlsys/perlmods/
 ./build-modules.sh

Note that the regular ExtUtils::F77 from CPAN does not work correctly if building with g95 as it prefers gfortran. We have a revised version with a different search path, probably easiest to copy it from /stardev. It should not be relevant if using the gfortran compiler, however, NDF.so built in perl-NDF with ExtUtils can still be linked to libg2c, which is not available on all Linux distros. After installing the Starlink version of ExtUtils::F77

cd perl-NDF
starperl Build.PL
./Build clean
./Build
./Build install

should remove the link to libg2c.so.

STARJAVA

LINUX

Download JDK (1.6) from Oracle. Download JAI from java.net: http://download.java.net/media/jai/builds/release/1_1_3/

Change directory to $STARCONF_DEFAULT_PREFIX and run the binary installer for the JDK, which will create jdk-<whatever> directories. Change into the created jdk- directory, then run the binary installer for JAI, which will install JAI into the JDK directory.

 mv jdk-WHATEVER java
 setenv STAR_JAVA $STARCONF_DEFAULT_PREFIX/java/bin/java

There appears to be an issue with the permissions of issions of $STARCONF_DEFAULT_PREFIX/java/lib/htmlconverter.jar. By default this file seems (as of the 2015-A release) to have a default permission of only being readable to the owner. This has to be fixed, at least in the Hilo /star and /stardev installations as it will otherwise not be rsync-able.

OS X

 export STAR_JAVA=/usr/bin/java

Both platforms

Make sure that the ~/.stardev.properties file has:

 star.dir=/star-<release>/starjava
 stardev=/star-<release>

(Not sure if this can take environment variables, which is why it doesn't use $STARCONF_DEFAULT_PREFIX)

 git clone git://github.com/Starlink/starjava.git starjava-<release>
 cd starjava-<release>
 git checkout <release>
 cd ant
 setenv PATH `pwd`/bin:${PATH}

Make sure that the Starlink 'ant' command is first in your path by doing:

 ant -projecthelp

If you see references for Starlink in there, you've done it right. Then do:

 ant install
 ant clean

Or if you didn't set up the properties file:

  ant -Dstar.dir=${STARLINK_DIR}/starjava install

Start using the new ant:

 setenv PATH $STARCONF_DEFAULT_PREFIX/starjava/bin:${PATH}

And build starjava:

 cd ..
 ant build
 ant install

Or if you didn't set up the properties file:

  cd ..
  unsetenv DISPLAY
  ant -Dstardev=${STARLINK_DIR} -Dstar.dir=${STARLINK_DIR}/starjava install

Then build the JNI libraries:

In each of:

Do:

ant -Dstardev=${STARLINK_DIR} -Dstar.dir=${STARLINK_DIR}/starjava build-native
ant -Dstardev=${STARLINK_DIR} -Dstar.dir=${STARLINK_DIR}/starjava install
ant -Dstardev=${STARLINK_DIR} -Dstar.dir=${STARLINK_DIR}/starjava test

It's important that the test stage succeeds. You may also want to check what "ldd/otool -L" report as the shared library dependencies. SPLAT should be able to read an NDF and report that the data type is NDF, not NDX.

ORAC-DR

 cd $STARCONF_DEFAULT_PREFIX/bin
 git clone git://github.com/Starlink/ORAC-DR.git oracdr
 cd oracdr
 git checkout <release>
 cd src/docs
 make install

 # Tidy up documents build tree?
 git clean -fdx

Final tidy up

Remove useless .dvi files:

  cd $STARLINK_DIR
  rm docs/*.htx/*.dvi

Recent Starlink releases seem to have left bin/oracdr/.git/ in place. ORAC-DR uses this to set the PIPEVERS header -- the alternative would be to generate the ${ORAC_DIR}/oracdr.version file: see documentation for ORAC::Version::_oracversion().

Finally make the release. This must be done from the directory containing the release directory so that the source directory can be given as the plain directory name. This ensures that it will unpack correctly into a simple subdirectory of the user's CWD when they unpack it. The following command omits the -v option in order for errors not to be hidden amongst a lot of other output.

   cd $STARLINK_DIR/..
   tar -czf /export/data/star/starlink-RELEASENAME-Linux_RCX.tar.gz star-2015A