# $Id: Portfile 92297 2012-04-24 12:06:39Z phw@macports.org $

PortSystem			1.0
PortGroup			python 1.0
name				py-apsw
python.versions 	24 25 26 27 31 32
version				3.7.11-r1
revision			0
maintainers			phw openmaintainer
description			Very thin SQLite 3 wrapper for python
long_description \
	APSW provides an SQLite 3 wrapper that provides the thinnest layer \
	over SQLite 3 possible.  Everything you can do from the C API to \
	SQLite 3, you can do from Python.  Although APSW looks vaguely \
	similar to the DBAPI, it is not compliant with that API and instead \
	works the way SQLite 3 does.

platforms			darwin
homepage            http://code.google.com/p/apsw/
master_sites		googlecode:apsw
distname			apsw-${version}
use_zip				yes

checksums           md5     0a9c5b0bf082c455acfc27231f563d24 \
                    sha1    aea455ea2e5f8091af61332a5ea394994970212f \
                    rmd160  398ee96783b2f2df4dfc94e1e49ac9de9757e047


if { ${name} != ${subport} } {

	depends_lib-append	port:sqlite3
	
	post-extract {
		file copy ${filespath}/setup.cfg ${worksrcpath}/setup.cfg
		reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.cfg
	}
	
	post-destroot {
		xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
		xinstall -m 644 -W ${worksrcpath}/doc/ apsw.html \
			${destroot}${prefix}/share/doc/${subport}
	}
}

livecheck.type  regex
livecheck.url   http://code.google.com/p/apsw/downloads/list
livecheck.regex {apsw-([0-9\.]+(-r1)?).zip}

