# -*- 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  iiinstrument
name            esopipe-${instrument}-datastatic
conflicts       esopipe-${instrument}-datastatic-devel
version         0.1.15
revision        2
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 example template instrument pipeline (static data)
long_description ESO data reduction pipeline for the example template 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}-5
checksums       sha256 c38c91c1d0ee2ace0082c9d97ae9b47f5b3a03f4ada0b7272a9adb1bc7d9fbc9

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