# -*- 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
# $Id: Portfile 94708 2012-06-27 08:03:00Z dports@macports.org $

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.8 5.10 5.12 5.14 5.16
perl5.setup         File-Rename 0.06
revision            2
platforms           darwin
maintainers         nomaintainer
license             {Artistic-1 GPL}
supported_archs     noarch

description         Renaming multiple files: based on eg/rename

long_description    A perl extension and command-line utility for renaming \
                    files, based on Larry Wall's 'rename' script

checksums           sha256 fd9be2f7d6e4c88badba440aabfe33984b1aa51921caff0bbcfe3218481e7f10 \
                    rmd160 f001df1db9ed6f1996984e4123b44b1ef775411c


perl5.link_binaries_suffix

# The module installs the command-line utility as `file-rename` but
# it's usually installed as `rename`; create a link under that name.
if {$subport != $name} {
    post-destroot {
        ln -s file-rename ${destroot}${prefix}/bin/rename
        ln -s [glob -tails -directory ${destroot}${prefix}/share/perl${perl5.major}/man/man1 file-rename.*] ${destroot}${prefix}/share/perl${perl5.major}/man/man1/rename.1
    }
}
