# -*- 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  espda
name            esopipe-${instrument}-datastatic
conflicts       esopipe-${instrument}-datastatic-devel
version         1.4.0
revision        1
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 ESPRESSO-DAS instrument pipeline (static data)
long_description ESO data reduction pipeline for the ESPRESSO-DAS 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/espresso-das
distname        ${instrument}-kit-${version}-3
checksums       sha256 7b4a07376cc9c4660fac012bdfea1b04915d8873608a9a7180b5a54dadaac9c5

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}
}
