# -*- 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  muse
name            esopipe-${instrument}-datastatic
conflicts       esopipe-${instrument}-datastatic-devel
version         2.10.14
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 MUSE instrument pipeline (static data)
long_description ESO data reduction pipeline for the MUSE 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}-1
checksums       sha256 0b1d1a964ad9efe0d14bf1ed7ae874c88d12a12e289587a591a4dc2f9f36ac7b

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