#-----------------------------------------------------------
# Copyright Christian Arnault LAL-Orsay CNRS
# arnault@lal.in2p3.fr
# See the complete license in cmt_license.txt "http://www.cecill.info". 
#-----------------------------------------------------------

description ('CMT <version>')
packageName ('CMT')
version ('<version>')

pacmanVersionGE('3.13')

{
    platformGE ('Linux') ; downloadUntar ('http://www.cmtsite.org/<version>/CMT<version>Linux-i686.tar.gz', 'CMTBASE')
  OR 
    platformGE ('Cygwin') ; downloadUntar ('http://www.cmtsite.org/<version>/CMT<version>CYGWIN_NT-5.1-i686', 'CMTBASE')
  OR
    downloadUntar ('http://www.cmtsite.org/<version>/CMT<version>.tar.gz', 'CMTBASE')
}

cd ('$CMTBASE/<version>/mgr')
shellOutputContains ('./INSTALL', 'CMT installation terminated')
{
  shellOutputContains ('. setup.sh; cmt version', '<version>') 
    OR shell ('. setup.sh; gmake') 
}
shellOutputContains ('. setup.sh; cmt version', '<version>')
cd ()

