PortSystem 1.0
PortGroup python 1.0

name			py-smb
version			0.4.4
revision		1
categories-append	net
license			zlib
maintainers		nomaintainer
platforms		{darwin any} freebsd
supported_archs	noarch
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://pysmb.sourceforge.net/
master_sites		sourceforge:pysmb
distname		pysmb-${version}
checksums		md5 768c729ed843359352099b12d5967c0b

python.versions	27

if {${name} ne ${subport}} {
    worksrcdir		pysmb

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

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

    post-destroot	{
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}/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/${subport}
        xinstall -m 644 -W ${worksrcpath} nmbquery smbcp smbdu smblistshare \
            ${destroot}${prefix}/share/doc/${subport}/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/${subport}/extra
    }
}
