PortSystem 1.0

name			polipo
version			1.0.4
revision		1
categories		www
license			MIT
platforms		darwin
maintainers		nomaintainer
description		small and fast web caching proxy
long_description	Polipo is a small and fast caching web proxy designed to \
				be used by one person or a small group of people.

homepage		http://www.pps.jussieu.fr/~jch/software/polipo/
master_sites	http://www.pps.jussieu.fr/~jch/software/files/polipo/
checksums		md5 defdce7f8002ca68705b6c2c36c4d096 \
			sha1 ba562906d125a6bf72dc36c2d078147d40cf8722 \
			rmd160 31739c5a5958c136ad452e877636b9f26343684f

patchfiles		patch-config.sample.diff patch-forbidden.c.diff \
				patch-forbidden.sample.diff patch-main.c.diff \
				patch-polipo.man.diff

post-patch {
	reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/config.sample \
		${worksrcpath}/forbidden.c ${worksrcpath}/forbidden.sample \
		${worksrcpath}/main.c ${worksrcpath}/polipo.man
}

use_configure	no

build.args		PREFIX=${prefix} \
				LOCAL_ROOT=${prefix}/share/polipo/www \
				DISK_CACHE_ROOT=${prefix}/var/cache/polipo

destroot.destdir	PREFIX=${prefix} \
				TARGET=${destroot} \
				MANDIR=${prefix}/share/man \
				INFODIR=${prefix}/share/info \
				DISK_CACHE_ROOT=${prefix}/var/cache/polipo \
				LOCAL_ROOT=${prefix}/share/polipo/www

destroot.keepdirs ${destroot}${prefix}/var/cache/polipo

post-destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/etc/polipo
	xinstall -m 644 ${worksrcpath}/config.sample \
		${worksrcpath}/forbidden.sample ${destroot}${prefix}/etc/polipo/
}

startupitem.create		yes
startupitem.netchange	yes
startupitem.executable	${prefix}/bin/polipo
startupitem.name		Polipo

livecheck.type	regex
livecheck.url	${homepage}CHANGES.text
livecheck.regex	Polipo (${version})