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

github.setup        Legcord Legcord 1.3.0 v
github.tarball_from archive

categories          net
maintainers         nonmaintainer
revision            0

checksums           rmd160  61aa5a44925335ae03af3ac558924d23ff0059b4 \
                    sha256  bdaccce0f26106d35f0b89df4a1efb7aa4a073ae0514fc252c287ae6fb1df301 \
                    size    3461522

description         lightweight alternative to the regular Discord application
long_description    ${name} is a {*}${description}. It wraps the Discord web \
                    client in a version of Chromium fully optimized for use \
                    with Discord's web interface, blocks trackers by default,\
                    and supports a variety of client plugin frameworks.

supported_archs     arm64
platforms           {darwin any}
license             OSL-3.0

depends_build       port:npm10 \
                    port:pnpm

use_configure       no

build {
    system -W ${worksrcpath} "pnpm install"
    system -W ${worksrcpath} "pnpm run build"
    system -W ${worksrcpath} "node_modules/.bin/electron-builder --dir"
}

destroot {
    file copy ${worksrcpath}/dist/mac-${build_arch}/Legcord.app ${destroot}${applications_dir}
}
