#!/bin/sh ### This is a replacement for configure when installing ### CCP4 binaries. ### When updating this script for new releases check for ### new configure features which might need to be here ### too. ### ### CCP4 licensing and conditions. ### ### A complete new section for licensing ### Removing or attempting to bypass this section in the BINARY.setup script ### is deemed as agreeing to the conditions outlined in $CCP4/license.txt agreed=no ans=n user=`whoami` ### has someone else we (know about) agreed to the ccp4 conditions before? ### and if so make sure the the home dir has agreement file if test -f .agree2ccp4; then eval touch ${HOME}/.agree2ccp4; if test -w .agree2ccp4; then echo $user `date` >> .agree2ccp4; fi if test -w ${HOME}/.agree2ccp4; then date >> ${HOME}/.agree2ccp4; fi agreed=yes fi ### has the user agreed to the ccp4 condition's before? if test $agreed = "no"; then if test -f ${HOME}/.agree2ccp4; then eval touch .agree2ccp4 if test -w ${HOME}/.agree2ccp4; then date >> ${HOME}/.agree2ccp4; fi if test -w .agree2ccp4; then echo $user `date` >> .agree2ccp4; fi agreed=yes fi fi ### so if this site, as far as we know has never agreed to ccp4 ### conditions then they must! if test $agreed = "no"; then echo ; echo ; echo " For legal reasons we must draw your attention to the" echo " conditions of use and license agreement required to " echo " use the CCP4 package (If you agree to the conditions" echo " you should only be prompted for this information once)." echo ; echo ; echo -n " Please press return to continue:" read return; if test -r licence.txt; then echo ; echo ; echo "Please read the following"; echo ; more licence.txt ; echo ; echo ; echo "Do you agree to the above and agree (if this has not" ; echo "already been done) to return a completed and signed"; echo "copy of this document found in license.txt? " echo "(Please note that if a copy of the previous license has been"; echo "returned there is no need to send a copy of this new agreement)"; echo -n " y/n [n] ?:"; read ans ; if test $ans = "y"; then eval touch ${HOME}/.agree2ccp4; if test -w ${HOME}/.agree2ccp4; then date > ${HOME}/.agree2ccp4; else echo " No record of you agreeing to the CCP4 license coditions"; echo " has been kept in your home area."; fi echo $user `date` > .agree2ccp4; chmod ugo+rw .agree2ccp4 ; agreed=yes ; echo ; echo ; echo " Thank you. The CCP4 configure will now run as normal."; fi else echo " The file license.txt in the $CCP4 directory could not be found" echo " Please download or contact ccp4@ccp4.ac.uk" ; echo ; echo; exit 1 fi fi if test $agreed = "no"; then echo ; echo ; echo " You have indicated that you do not agree to the conditions"; echo " of use for the CCP4 package. Please delete all CCP4 software"; echo " from your system. If you have any further queries please refer "; echo " to the CCP4 web pages on http://www.dl.ac.uk/CCP/CCP4/ or contact" ; echo " ccp4@ccp4.ac.uk"; exit 1 fi ### End of licensing section. ### Check the values of the necessary environment variables badvar=0 # set true if any of the checks fail for i in BINSORT_SCR CCP4_SCR CINCL CLIBD CCP4_OPEN PUBLIC_FONT84 do if eval test -z \"\$$i\" ; then echo "! Please set environment variable $i (see installation instructions)." badvar=1 else true fi done test $badvar -eq 1 && exit 1 || true ### Create scratch directories if necessary badvar=0 # set true if any of the checks fail for i in CCP4_SCR BINSORT_SCR; do if eval test -d \$$i || eval mkdir \$$i; then : else eval echo "! No directory \$$i and can\'t create it." echo " Check the value of $i." badvar=1 fi done for i in ./ccp4i/etc/unix ; do if test -d $i || mkdir $i; then : else eval echo "! No directory $i and can\'t create it." badvar=1 fi done test $badvar -eq 1 && exit 1 || true ### build mmCIF symbol table cifdic_to_symtab ${CLIBD}/cif_mm.dic ${CCP4_LIB}/cif_mmdic.lib 199 > cif_mmdic.out ### build font84.dat cd lib/data; fontpack; cp font84.dat ${CCP4_LIB}/font84.dat; cd ../.. ### make man pages and AstexViewer examples cd html; ./makeman.csh; cd AstexViewer_man ; ./make_examples.csh ; cd ../..