Portfile

# $Id: Portfile 23185 2007-03-27 03:15:11Z jmpp@macports.org $

PortSystem 1.0

name ntfs-3g
version 1.0
categories fuse
platforms darwin
maintainers eridius@macports.org
description Safe read/write NTFS driver for FUSE
long_description The NTFS-3G driver is an open source, freely available \
NTFS driver for FUSE with read and write support. It \
provides safe and fast handling of the Windows XP, Windows \
Server 2003, Windows 2000 and Windows Vista file systems. \
Most POSIX file system operations are supported, with the \
exception of full file ownership and access right support.

homepage http://www.ntfs-3g.org/
extract.suffix .tgz

master_sites $homepage
checksums $distfiles md5 873a8de662849d129fc7c475ad3f5447 \
sha1 e4cf952a17a3a9e3f1e53d09cb8dd544e5ecfd0f

depends_lib lib:libfuse:libfuse bin:pkg-config:pkgconfig

platform darwin {
depends_run port:fusefs
patch_sites http://macfuse.googlecode.com/svn/tags/macfuse-0.2.2/filesystems/ntfs-3g/
patchfiles ${name}-${version}.patch
checksums-append ${name}-${version}.patch md5 9b9293e6d7f398375e46905c4e812999 \
sha1 e74c4a74645377450646d94b5b0cbe0fcaa9a58d

# override patch.pre_args since it defaults to -p0
patch.pre_args -p1
}

post-destroot {
# ntfs-3g symlinks /sbin/mount.ntfs-3g to ${prefix}/bin/ntfs-3g
# but on darwin mount wants mount_* instead of mount.*
file rename -- ${destroot}/sbin/mount.ntfs-3g ${destroot}/sbin/mount_ntfs-3g
file rename -- ${destroot}${prefix}/man/man8/mount.ntfs-3g.8 \
${destroot}${prefix}/man/man8/mount_ntfs-3g.8
}