PortSystem          1.0
PortGroup           python 1.0

name                sitemap_gen
version             1.5
license             BSD
categories          www python
platforms           darwin
supported_archs     noarch
maintainers         google.com:mstokely
description         sitecopy website maintenance utility
long_description    The sitemap_gen.py script analyzes your web server \
                    and generates one or more Sitemap files. These files \
                    are XML listings of content you make available on your \
                    web server. The files can then be directly submitted \
                    to Google.

homepage            http://code.google.com/p/sitemap-generators/
master_sites        googlecode:sitemap-generators
distname            ${name}_${version}
checksums           md5     98754e802722c0cc2ffcc8aedead67b6 \
                    sha1    37126d3cb484ae28a6c7ff1ba8b2c96d2d79d1e8 \
                    rmd160  3b781f8cfc8618263bb852ef58836e4ef1527ea5

extract.mkdir       yes

python.default_version  26

patchfiles          patch-sitemap_gen_py.diff
post-destroot {
    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    xinstall -d -m 0755 ${destroot}${prefix}/share/examples/${name}
    xinstall -m 0644 -W ${worksrcpath} \
        AUTHORS ChangeLog COPYING README \
        ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 -W ${worksrcpath} \
        example_config.xml example_urllist.txt \
        ${destroot}${prefix}/share/examples/${name}

    xinstall -m 0755 ${worksrcpath}/${name}.py ${destroot}${prefix}/bin/${name}
    reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python${python.branch}|" \
        ${destroot}${prefix}/bin/sitemap_gen
}