# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name	   lurker
version	   2.3
set mimelib_release 3.1.1
categories	mail
platforms	darwin
license		GPL-2
maintainers	nomaintainer

description	Not just another mailing list archiver.
long_description	After being subscribed to interesting mailing lists, lurker archives \
			all incoming mail into a database. Old mail can also be imported. \
			Once  mail is in the database, lurker can help you search the \
			unending noise for those gems you need to read. A web-browser \
			is used to interact with lurker. This makes lurker useful for \
			mailing list administrators, who can deploy lurker on the host \
			of several related lists. Among some of the interesting features \
			lurker offers you can find: full keyword search by body, subject, \
			author, ...\; a graphical representation of message relationships\; \
			charts of the current activity about a topic\; searching lists or \
			queries around an estimated time\; signature verification to confirm \
			the author\; messages markup to find related information\; etc.

homepage	http://lurker.sourceforge.net/
master_sites	sourceforge
distfiles-append	mimelib-${mimelib_release}${extract.suffix}
checksums           ${distname}.tar.gz \
                    md5     368d5890b28bb9533a532b48bb9e08b8 \
                    sha1    11976e94f3846e09b7164d359605f5a5081b7d70 \
                    rmd160  c4514fb90d21b0d470ca928b58a708f24abe2155 \
                    mimelib-${mimelib_release}.tar.gz \
                    md5     f50d492e9bae694b449033a188afb770 \
                    sha1    6890d5aaeb51543c2b4104d624dfdfbb8a7e77a1 \
                    rmd160  7f7f246245cdc70264a0b3f4997ff8d1ca51a84c

depends_lib	lib:libiconv:libiconv \
		lib:libxslt.1:libxslt

post-extract	{ file rename ${workpath}/mimelib ${workpath}/${distname} }

configure.args	--mandir=${prefix}/share/man --with-mimelib-local

build.args	CXXFLAGS="-DDW_UNIX"

destroot.keepdirs	${destroot}${prefix}/var/lib/lurker \
			${destroot}${prefix}/var/www/${name}/attach \
			${destroot}${prefix}/var/www/${name}/list \
			${destroot}${prefix}/var/www/${name}/mbox \
			${destroot}${prefix}/var/www/${name}/message \
			${destroot}${prefix}/var/www/${name}/mindex \
			${destroot}${prefix}/var/www/${name}/search \
			${destroot}${prefix}/var/www/${name}/splash \
			${destroot}${prefix}/var/www/${name}/thread
post-destroot	{
		xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
		file copy ${worksrcpath}/lurker.conf ${destroot}${prefix}/etc
		xinstall -m 644 -v -W ${worksrcpath} INSTALL FAQ \
		${destroot}${prefix}/share/doc/${name}/
		reinplace "s|/usr/local|${prefix}|g" ${destroot}${prefix}/share/doc/${name}/INSTALL
		reinplace "s|/etc|${prefix}/etc|g" ${destroot}${prefix}/share/doc/${name}/INSTALL
		reinplace "s|${prefix}${prefix}/etc|${prefix}/etc|" \
		${destroot}${prefix}/share/doc/${name}/INSTALL
}

post-activate	{
		ui_msg "\nLurker configuration is currently left entirely up to the user installing the port.\n \
		Read ${prefix}/share/doc/${name}/INSTALL for information."
}
