
               Installation of the Gemini IRAF package v1.13.1
               -----------------------------------------------

[0] All users are encouraged to use Ureka (http://ssb.stsci.edu/ureka/) to
    install IRAF and the Gemini IRAF package. Installation instructions for
    Ureka users can be found at
    http://www.gemini.edu/sciops/data-and-results/processing-software/download.

    Users who do not wish to use Ureka should continue to read these
    installation instructions. The Gemini IRAF package v1.13.1 is available 
    for use with IRAF v2.14 (gemini_v1131_for_iraf_2.14.tar.gz) or for use 
    with the Ureka version of IRAF 2.16 (gemini_v1131_for_iraf_2.16.tar.gz). 
    Please refer to 
    http://www.gemini.edu/sciops/data-and-results/processing-software/requirements
    for other requirements on your IRAF installation including other required
    external packages.

    The Gemini IRAF package v1.13.1 will run under both IRAF and PyRAF
    environments.

    WARNING!! The Gemini IRAF package v1.13.1 does NOT work reliably with the
    32-bit or 64-bit version of IRAF v2.16 as distributed by NOAO.

    The Gemini IRAF package was tested under Ureka IRAF v2.16.

[1] The Gemini IRAF package v1.13.1 is distributed via the Gemini web pages:

        http://www.gemini.edu/sciops/data-and-results/processing-software

    The file gemini_v1131_for_iraf_2.14.tar.gz is required for those users 
    who use IRAF v2.14, while the file gemini_v1131_for_iraf_2.16.tar.gz is 
    required for those users who use Ureka.

    One of the above files and the file gemini_readme.txt are required and 
    are both linked from the Gemini web pages.
    
    The gemini_readme.txt file contains these instructions.

[2] gunzip the file gemini_v1131_for_iraf_<version>.tar.gz

        % gunzip gemini_v1131_for_iraf_<version>.tar.gz

[3] Create a directory to contain the Gemini IRAF package files. This 
    directory should be outside the IRAF directory tree and must be owned by 
    the IRAF user. In the following example, the Gemini root directory is 
    named /iraf/extern/gemini/ (UNIX and Linux). Make the appropriate file 
    name substitutions for your site.

[4] Log in as the IRAF user and edit the extern.pkg file in the hlib 
    directory to define the package in IRAF. From the IRAF user account, 
    outside IRAF, move to this directory with the command:

        % cd $hlib

    Define the environmental variable "gemini" to be the pathname to the 
    Gemini root directory. UNIX pathnames must be terminated with a "/". 
    Edit extern.pkg to include:

        reset gemini     = /iraf/extern/gemini/
        task  gemini.pkg = gemini$gemini.cl

    Near the end of the hlib$extern.pkg file, update the definition of helpdb
    so it includes the Gemini help database, copying the syntax already used
    in the string. Add this line before the line containing a closing quote:

                ,gemini$lib/helpdb.mip\

[5] Log into IRAF as the IRAF user and unpack the archive file. Change
    directories to the Gemini root directory created above and use "rtar":

        cl> cd gemini
        cl> softools
        cl> rtar -xrf <path>/gemini_v1131_for_iraf_<version>.tar
    
    where <path> is the relative path from /iraf/extern/gemini to the
    downloaded file.

    It is possible to also unpack the file gemini_v1131_for_iraf_<version>.tar
    from UNIX:

        % cd /iraf/extern/gemini/
        % tar xvf <path>/gemini_v1131_for_iraf_<version>.tar

[6] You only need to compile the Gemini IRAF package if prebuilt binaries are
    not available for your system. Binaries are provided for Red Hat/Fedora
    Linux (compiled on CentOS 5) and Mac OS X Intel (compiled on 10.6 Snow 
    Leopard).  The binaries should work on more recent operating systems than 
    the ones used for the build.  Please note that Mac OS X PPC binaries for 
    IRAF v2.14 are no longer supported. If these binaries are required, please 
    follow the instructions below to compile the appropriate binaries. Please 
    also note that the Gemini IRAF package is not compatible with the 64-bit 
    version of IRAF.

    Binaries provided in the Gemini IRAF package for IRAF v2.14:

        bin.redhat      (Linux 32-bit)
        bin.macintel    (Mac OS X 32-bit Intel)

    Binaries provided in the Gemini IRAF package for Ureka IRAF v2.16:

        bin.linux       (Linux 32-bit)
        bin.macosx      (Mac OS X 32-bit Intel)

    Building the package binaries requires that the following external 
    packages be installed on your system, in addition to the standard IRAF 
    and NOAO packages:

        tables      (http://www.stsci.edu/resources/software_hardware/tables)
        fitsutil    (http://iraf.noao.edu/iraf/ftp/iraf)

    You must also have a suitable FORTRAN compiler installed (see
    http://iraf.noao.edu/faq/FAQ.html).

    To build the binaries, the "gemini" environmental variable must be set.
    This will already be set in the extern.pkg file if the package was
    installed under iraf/extern/ as the IRAF administrator using the above
    instructions. For an end user, with the package installed in their home
    directory, define the "gemini" environmental variable manually:

        % setenv gemini /home/<user>/iraf/gemini/              (csh)
        % gemini=/home/<user>/iraf/gemini/ ; export gemini     (sh)

    If installing the Gemini IRAF package as a user other than the IRAF user,
    ensure that the following commands are run from C-shell.

    Before building the binaries, first remove the binaries distributed
    throughout the package by issuing the following commands:

        % cd $gemini
        % mkpkg -p gemini generic
        % rm lib/lib*.a
        % rm bin.<arch>/OBJS.arc.Z
        % rm bin.<arch>/lib*
        % rm bin.<arch>/*.e

    Ensure that the IRAFARCH environmental variable is set correctly for your
    system, then configure the system for the desired architecture:

        % mkpkg -p gemini <arch>
    
    where <arch> is the architecture (e.g., redhat, macosx, macintel, etc.)

    Once configured, issue the following command to compile:

        % mkpkg -p gemini update >& gemini.spool

    On systems that concurrently support different architectures, repeat the
    commands above for each architecture.

    The spool file(s) should be reviewed upon completion to make sure there
    were no errors.

[7] If updating an older installation of the Gemini IRAF package, it is
    recommended that users initialize their uparm directories by typing
    "rm uparm/*" in their iraf home directory (i.e., where mkiraf was executed
    / where the login.cl file is located). NOTE: if you wish to make a note of
    any stored parameters, please do so before running this command.

[8] Please use the Gemini HelpDesk for submitting questions
    http://www.gemini.edu/sciops/helpdesk/helpdeskIndex.html
