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

name                deark
version             1.7.3
revision            0

categories          archivers
license             MIT
maintainers         {gmail.com:srirangav @srirangav} openmaintainer

description         A utility for file format and metadata analysis, \
                    data extraction, decompression, and image format decoding
long_description    Deark is a command-line utility that can decode certain \
                    types of files, and either convert them to a more-modern or \
                    more-readable format, or extract embedded files from them

homepage            https://entropymine.com/deark
master_sites        ${homepage}/releases/

checksums           rmd160  c8c7e978727f3d40f52f97f9b7b6af16690c504a \
                    sha256  84f9e0134830389e4ab12c89dc09cf42a3f885ec551254e9fdc22952858add11 \
                    size    2624697

depends_build-append \
                    port:help2man

# Remove after deark 1.7.3
patchfiles          0001-Try-to-fix-macOS-builds-st_mtim-st_atim-related.patch

post-build {
    system -W ${worksrcpath} "make man"
}

destroot {
    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 755 -s ${worksrcpath}/${name} ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
}
