# $Id: Portfile 45170 2009-01-09 19:56:50Z mcalhoun@macports.org $

PortSystem 1.0

name			convmv
version			1.10
categories		sysutils perl
platforms		darwin
maintainers		nomaintainer
description		Convert filenames from one encoding to another
long_description	convmv is meant to help convert a single filename, a \
			directory tree and the contained files or a whole filesystem into \
			a different encoding. It just converts the filenames, not the \
			content of the files. A special feature of convmv is that it also \
			takes care of symlinks, also converts the symlink target pointer \
			in case the symlink target is being converted, too. All this comes \
			in very handy when one wants to switch over from old 8-bit locales \
			to UTF-8 locales. It is also possible to convert directories to \
			UTF-8 which are already partly UTF-8 encoded. convmv is able to \
			detect if certain files are UTF-8 encoded and will skip them by \
			default. To turn this smartness off use the --nosmart switch.

homepage		http://j3e.de/linux/convmv/man/
master_sites	http://j3e.de/linux/convmv/
checksums		md5 8daf88557f40523312c40abc31b8167f \
				sha1 44cee0c861ced92c5061a0e2287bfb9ef791d22f \
				rmd160 e9faf9e698006b2faa24e65374819053cfa0b6a4

depends_lib		bin:perl:perl5

patch {
	reinplace "s|/usr/bin/perl|/usr/bin/env perl|g" ${worksrcpath}/convmv
}

use_configure	no

destroot.args	PREFIX=${prefix} MANDIR=${prefix}/share/man
post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} CREDITS Changes GPL2 TODO VERSION \
		${destroot}${prefix}/share/doc/${name}
}

