# $Id: Portfile,v 1.8 2004/12/28 06:35:56 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-smb
version			0.4.4
revision		1
categories		python net
maintainers		mww@opendarwin.org
platforms		darwin freebsd
description		SMB/CIFS library for python
long_description	SMB/CIFS library for python speaking NT LM0.12 \
				enables python to access shares from Windows computers or \
				machines running Samba.

homepage		http://miketeo.net/projects/pysmb/
master_sites	${homepage}
distname		pysmb-${version}
checksums		md5 768c729ed843359352099b12d5967c0b

worksrcdir		pysmb

extract.post_args	"| tar -xf - --exclude 'CVS'"

patch	{
	file copy ${portpath}/files/setup.py ${worksrcpath}
	reinplace "s|VERSION|${version}|g" ${worksrcpath}/setup.py
}

post-destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/extra
	xinstall -m 644 -W ${worksrcpath}/docs index.html nmb_nbhostentry.html \
		nmb_nbnodeentry.html nmb_netbios.html nmb_netbiossession.html \
		return.gif smb.html smb_shareddevice.html smb_sharedfile.html \
		smb_smb.html smb_smbmachine.html nmb.html \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} nmbquery smbcp smbdu smblistshare \
		${destroot}${prefix}/share/doc/${name}/examples
	xinstall -m 644 -W ${worksrcpath}/extra NT4_PlainPassword.reg \
		Win2000_PlainPassword.reg Win95_PlainPassword.reg \
		Win98_PlainPassword.reg WinME_PlainPassword.reg \
		${destroot}${prefix}/share/doc/${name}/extra
}
