# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem      1.0

set instrument  kmos
name            esopipe-${instrument}-datastatic
conflicts       esopipe-${instrument}-datastatic-devel
version         4.5.3
categories      science
license         GPL-2+
platforms       darwin
maintainers     eso.org:usd-help
homepage        http://www.eso.org/sci/software/pipelines/
supported_archs noarch
description     ESO KMOS instrument pipeline (static data)
long_description ESO data reduction pipeline for the KMOS instrument. \
                 See www.eso.org/pipelines for a description of the ESO pipeline systems. \
                 This package contains the static data used by the pipeline.
master_sites    https://ftp.eso.org/pub/dfs/pipelines/instruments/${instrument}
distname        ${instrument}-kit-${version}
checksums       sha256 d0aeb460ef56e091403f357c2a9b75f9f2e27743b77642e4d565fd1164b35a34

worksrcdir          ${instrument}-calib-${version}
extract.post_args   "| tar -xf - ${distname}/${instrument}-calib-${version}.tar.gz"

post-extract {
    system "tar -xzopf ${workpath}/${distname}/${instrument}-calib-${version}.tar.gz -C ${workpath}"
    system "rm -rf ${workpath}/${distname}"
}


use_configure   no
build {}

destroot {
    set staticdatadir ${prefix}/share/esopipes/datastatic/${instrument}-${version}

    xinstall -m 755 -d ${destroot}${staticdatadir}
    xinstall -m 644 {*}[glob ${worksrcpath}/cal/*] ${destroot}${staticdatadir}
}
