Portfile

# $Id: Portfile 20412 2006-11-03 02:14:55Z jberry@macports.org $

PortSystem 1.0
name tin
version 1.8.1
categories news
platforms darwin
maintainers nomaintainer@macports.org
homepage http://www.tin.org/
description A threaded NNTP and spool based UseNet newsreader

long_description tin is a full-screen easy to use Usenet reader. It can read news \
locally or remotely via a NNTP (Network News Transport Protocol) \
server. It will automatically utilize NOV (News OVerview) style \
index files if available locally or via the NNTP XOVER command.

master_sites ftp://ftp.tin.org/${name}/v1.8/ \
ftp://ftp.cuhk.edu.hk/pub/packages/news/${name}/v1.8/ \
ftp://ftp.lip6.fr/pub/unix/news/readers/tin-unoff/ \
ftp://ftp.stikman.com/pub/${name}/v1.8/

use_bzip2 yes

checksums md5 efeecdf72683213d9e705c28de87ea2e \
sha1 39253fe626f97295203f5ded3f6bb935e5ad6f63 \
rmd160 145ebf7ca4f94402f39124ec505126cb0ac22a73

configure.args --enable-break-long-lines \
--enable-nntp \
--enable-mh-mail-handling \
--enable-included-msgs \
--with-coffee \
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--datadir=${prefix}/share \
--sysconfdir=${prefix}/etc \
--with-defaults-dir=${prefix}/etc/${name} \
--disable-pgp-gpg

build.dir ${worksrcpath}/src

pre-destroot { file mkdir ${destroot}${prefix}/share/doc/${name}
file mkdir ${destroot}${prefix}/etc/${name}
xinstall -m 644 -v -W ${worksrcpath}/doc \
auth.txt CHANGES config-anomalies \
filtering good-netkeeping-seal iso2asc.txt \
keymap.sample mailcap.sample pgp.txt \
reading-mail.txt TODO umlaute.txt umlauts.txt \
WHATSNEW \
${destroot}${prefix}/share/doc/${name}
}

destroot.keepdirs ${destroot}${prefix}/etc/${name}

post-destroot { xinstall -m 755 -v -W ${worksrcpath}/tools \
expiretover tinews.pl tinlock \
${destroot}${prefix}/bin
}

post-activate { set f tin.defaults
if {![file exists ${prefix}/etc/${name}/${f}]} {
file copy ${worksrcpath}/doc/${f} \
${prefix}/etc/${name}/${f}
}
}

variant ipv6 { configure.args-append --enable-ipv6 }

variant gpg { depends_run bin:gpg:gnupg
configure.args-delete --disable-pgp-gpg
configure.args-append --with-gpg=${prefix}/bin/gpg \
--without-pgp \
--without-pgpk
}

variant pgp5 { depends_run bin:pgpk:pgp
configure.args-delete --disable-pgp-gpg
configure.args-append --with-pgpk=${prefix}/bin/pgpk \
--without-gpg \
--without-pgp
}

variant ncurses { configure.args-append --with-screen=ncurses }

variant ispell { depends_build bin:ispell:ispell
configure.args-append --enable-ispell
}