# -*- 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

PortSystem          1.0
PortGroup           deprecated 1.0

deprecated.eol_version yes

name                aspnetcore-runtime-3.1
version             3.1.32
revision            1
categories          dotnet
license             MIT
maintainers         {@tsabirgaliev gmail.com:tair.sabirgaliev} \
                    {@judaew judaew} openmaintainer

description         ASP.NET Core is a cross-platform .NET framework for building modern \
                    cloud-based web applications on Windows, Mac, or Linux.

long_description    .NET is a free, cross-platform, open source developer platform \
                    for building many different types of applications. \
                    \
                    With .NET, you can use multiple languages, editors, and libraries \
                    to build for web, mobile, desktop, games, and IoT.

homepage            https://dotnet.microsoft.com/
platforms           {darwin any} {darwin >= 19}
supported_archs     x86_64
distname            aspnetcore-runtime-${version}-osx-x64
master_sites        https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/

checksums           rmd160  d9c4da94b1e6a8a1c3f60d15667359a5d580d9e5 \
                    sha256  cc853a95232ce6b8c4443d5d9dd71927c24cc18931589709aedad7d94fa5baff \
                    size    37695493

worksrcdir          ${name}-${version}
extract.mkdir       yes

use_configure       no

depends_run         port:dotnet-cli \
                    port:dotnet-runtime-3.1

build {}

destroot {
    set dotnet_home ${prefix}/share/dotnet
    set runtime_dir /shared/Microsoft.AspNetCore.App
    xinstall -d ${destroot}${dotnet_home}${runtime_dir}

    move ${worksrcpath}${runtime_dir}/${version} ${destroot}${dotnet_home}${runtime_dir}
}

livecheck.type      regex
livecheck.url       https://dotnet.microsoft.com/download/dotnet/3.1
livecheck.regex     "ASP.NET Core Runtime (\\d+(?:\\.\\d+)*)"