--- Portfile.orig	2007-12-21 19:01:59.000000000 +0000
+++ Portfile	2007-12-21 19:11:46.000000000 +0000
@@ -2,8 +2,7 @@
 
 PortSystem 1.0
 name			tin-devel
-version			1.7.10
-revision		1
+version			1.9.2
 categories		news
 platforms		darwin
 maintainers		nomaintainer
@@ -15,19 +14,19 @@
 			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/tin/v1.7/ \
-			ftp://ftp.cuhk.edu.hk/pub/packages/news/tin/v1.7/ \
-			ftp://ftp.stikman.com/pub/tin/v1.7/
+master_sites		ftp://ftp.tin.org/tin/v1.9/ \
+			ftp://ftp.cuhk.edu.hk/pub/packages/news/tin/v1.9/
 			
 use_bzip2		yes
 
-checksums		md5 23473a665d6d39ed4463b77d227cbb28
+checksums		md5 251094ddf0e2b059227a4b02187c5f3e \
+			sha1 51ba9fbd3bd4413b2630e86ad2f864ce75bf52aa \
+			rmd160 e2171a6ac047eff79b07109db40022b047ee06ef
 
 distname		tin-${version}
 
 configure.args          --enable-break-long-lines \
                         --enable-nntp \
-			--enable-debug \
 			--enable-mh-mail-handling \
 			--enable-included-msgs \
 			--with-coffee \
@@ -35,27 +34,34 @@
 			--infodir=${prefix}/share/info \
 			--datadir=${prefix}/share \
 			--sysconfdir=${prefix}/etc \
+			--with-defaults-dir=${prefix}/etc/${name} \
 			--disable-pgp-gpg
 			
+build.dir		${worksrcpath}/src
 
-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" \
+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}"
-			file copy "${worksrcpath}/doc/tin.defaults" \
-				"${destroot}${prefix}/etc/${name}"
+				${destroot}${prefix}/share/doc/${name}
 			}
 
-post-destroot {		xinstall -m 755 -v -W "${worksrcpath}/tools" \
+destroot.keepdirs	${destroot}${prefix}/etc/${name}
+
+post-destroot {		xinstall -m 755 -v -W ${worksrcpath}/tools \
 				expiretover tinews.pl tinlock \
-				"${destroot}${prefix}/bin"
+				${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 }
@@ -79,4 +85,3 @@
 variant ispell {	depends_build		bin:ispell:ispell
 			configure.args-append	--enable-ispell
 			}
-			
