# -*- 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             mved
version          3.0
revision         0

categories       sysutils
license          GPL-2+
maintainers      {raf.org:raf @macportsraf} openmaintainer
description      carefully rename multiple files and directories
long_description {*}${description}
supported_archs  noarch
platforms        any

homepage         https://raf.org/${name}/
master_sites     ${homepage}download/ \
                 https://web.archive.org/web/20230616064807/${homepage}download/ \
                 https://github.com/raforg/${name}/releases/download/v${version}/ \
                 https://codeberg.org/raforg/${name}/releases/download/v${version}/
checksums        rmd160 4a8944ee7338741daf2699c9f9eeca6ef0a7962d \
                 sha256 f8e01e9fee847e01cd2ee3a7e621c97e49c8f7c52e472b3efacfeb1029a5ff31 \
                 size 31186

post-patch {
    # Set the installation prefix
    # Suppress a runtime reinplace warning when ${prefix} is /usr/local (unlikely)
    if {![string match /usr/local ${prefix}]} {
        reinplace -W ${worksrcpath} "s|/usr/local|${prefix}|g" Makefile
    }
}

build {}

test.run         yes

livecheck.type   regex
livecheck.url    ${homepage}download/
livecheck.regex  ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}

