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

name                tmd
version             "0.0.13"
categories          textproc devel
platforms           darwin
supported_archs     arm64
license             AGPL-3
maintainers         {github:intelligent-username}
description         Convert files to token-efficient Markdown for LLM prompts
long_description    {*}${description}. Supports PDF, DOCX, PPTX, XLSX, ODT, \
                    EPUB, MOBI, HTML, JSON, CSV, LaTeX, e-mail, subtitles, \
                    Jupyter notebooks, and whole code repositories.
homepage            https://github.com/intelligent-username/tokens.md

distfiles           tmd-macos-arm64
master_sites        https://github.com/intelligent-username/tokens.md/releases/download/v${version}/
checksums           rmd160  REPLACE_WITH_RIPEMD160_ARM64 \
                    sha256  ffc63412fb97296205f330a9d429b723b47af3be2950274fce66d9eb17358ba3 \
                    size    REPLACE_WITH_SIZE_ARM64

use_configure       no
build               {}

destroot {
    file copy ${worksrcpath}/tmd-macos-arm64 ${destroot}${prefix}/bin/tmd
    file attributes ${destroot}${prefix}/bin/tmd -permissions 0755
}

test.run            yes
test.cmd            ${prefix}/bin/tmd
test.args           --version
