# -*- 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                mmv
set base_version    1.01b
version             ${base_version}-15
revision            0
categories          sysutils
platforms           darwin
license             GPL-2
maintainers         nomaintainer

description         Move/Copy/Append/Link multiple files

long_description    ${description}

homepage            https://web.archive.org/web/20160318200450/http://linux.maruhn.com/sec/mmv.html
master_sites        debian:m/${name}
distname            ${name}_${base_version}.orig
worksrcdir          ${name}-${base_version}.orig
patchfiles          ${name}_${version}.diff.gz
patch.pre_args-replace  -p0 -p1

checksums           ${distfiles} \
                    rmd160  b268bd5ec5149a4628b73844221f6f60b026e80b \
                    sha256  0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef \
                    size    25656 \
                    ${patchfiles} \
                    rmd160  5fe3beaf00dcdf0080aeebb9c6af2450c1c857fb \
                    sha256  9ad3e3d47510f816b4a18bae04ea75913588eec92248182f85dd09bc5ad2df13 \
                    size    10613 \

use_configure       no

variant universal {}

build.cmd           ${configure.cc}
build.target        -o ${name} ${name}.c ${configure.cflags} [get_canonical_archflags cc]

destroot {
    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0755 -W ${worksrcpath} ${name} ${destroot}${prefix}/bin
    xinstall -m 0644 -W ${worksrcpath} ${name}.1 \
        ${destroot}${prefix}/share/man/man1
    xinstall -m 0644 -W ${worksrcpath} ANNOUNCE ARTICLE debian/changelog debian/copyright \
        ${destroot}${prefix}/share/doc/${name}
    foreach alias {mcp mad mln} {
        ln -s ${name} ${destroot}${prefix}/bin/${alias}
        ln -s ${name}.1 ${destroot}${prefix}/share/man/man1/${alias}.1
    }
}

livecheck.type      none
