diff --git a/www/tinyproxy/Makefile b/www/tinyproxy/Makefile
index 7f119da..e610149 100644
--- a/www/tinyproxy/Makefile
+++ b/www/tinyproxy/Makefile
@@ -1,8 +1,7 @@
 # $NetBSD: Makefile,v 1.26 2010/01/16 17:57:38 wiz Exp $
 #
 
-DISTNAME=	tinyproxy-1.6.2
-PKGREVISION=	6
+DISTNAME=	tinyproxy-1.8.3
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=tinyproxy/}
 
@@ -19,6 +18,7 @@ PKG_SYSCONFSUBDIR=	tinyproxy
 
 .include "../../mk/bsd.prefs.mk"
 
+BUILD_DEPENDS+=		asciidoc:../../textproc/asciidoc
 BUILD_DEFS+=		VARBASE
 
 TINYPROXY_USER?=	tinyproxy
@@ -31,6 +31,7 @@ FILES_SUBST+=		TINYPROXY_USER=${TINYPROXY_USER:Q}
 FILES_SUBST+=		TINYPROXY_GROUP=${TINYPROXY_GROUP:Q}
 
 CONFIGURE_ARGS+=	--with-config=${PKG_SYSCONFDIR}/tinyproxy.conf
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=	--enable-transparent-proxy
 
 .include "options.mk"
@@ -41,19 +42,18 @@ CONF_FILES=	${EGDIR}/tinyproxy.conf.default ${PKG_SYSCONFDIR}/tinyproxy.conf
 
 SUBST_CLASSES+=		docs
 SUBST_STAGE.docs=	pre-configure
-SUBST_FILES.docs=	doc/tinyproxy.8 doc/tinyproxy.conf
+SUBST_FILES.docs=	docs/man5/tinyproxy.conf.txt.in docs/man8/tinyproxy.txt.in etc/tinyproxy.conf.in
 SUBST_SED.docs+=	-e 's,@TINYPROXY_USER@,${TINYPROXY_USER},g'
 SUBST_SED.docs+=	-e 's,@TINYPROXY_GROUP@,${TINYPROXY_GROUP},g'
 SUBST_SED.docs+=	-e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.docs+=	-e 's,@DATADIR@,${PREFIX}/share/tinyproxy,g'
 SUBST_SED.docs+=	-e 's,@VARBASE@,${VARBASE},g'
 
 INSTALLATION_DIRS=	${EGDIR} share/doc/tinyproxy
 
 post-install:
-	${INSTALL_DATA} ${WRKSRC}/doc/tinyproxy.conf \
+	${INSTALL_DATA} ${WRKSRC}/etc/tinyproxy.conf \
 		${DESTDIR}${EGDIR}/tinyproxy.conf.default
-	${INSTALL_DATA} ${WRKSRC}/doc/filter-howto.txt \
+	${INSTALL_DATA} ${WRKSRC}/docs/filter-howto.txt \
 		${DESTDIR}${PREFIX}/share/doc/tinyproxy/
 
 .include "../../security/openssl/buildlink3.mk"
diff --git a/www/tinyproxy/PLIST b/www/tinyproxy/PLIST
index 23975c1..592ddfc 100644
--- a/www/tinyproxy/PLIST
+++ b/www/tinyproxy/PLIST
@@ -1,6 +1,10 @@
-@comment $NetBSD: PLIST,v 1.3 2005/05/02 20:34:07 reed Exp $
+@comment $NetBSD$
+man/man5/tinyproxy.conf.5
 man/man8/tinyproxy.8
 sbin/tinyproxy
 share/doc/tinyproxy/filter-howto.txt
 share/examples/rc.d/tinyproxy
 share/examples/tinyproxy/tinyproxy.conf.default
+share/tinyproxy/debug.html
+share/tinyproxy/default.html
+share/tinyproxy/stats.html
diff --git a/www/tinyproxy/distinfo b/www/tinyproxy/distinfo
index fdb7649..fabfada 100644
--- a/www/tinyproxy/distinfo
+++ b/www/tinyproxy/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.5 2005/02/24 14:08:39 wiz Exp $
+$NetBSD$
 
-SHA1 (tinyproxy-1.6.2.tar.gz) = b305ebdef29de19e0c2c74efcd4a2acd8caa9018
-RMD160 (tinyproxy-1.6.2.tar.gz) = a85ebc7ebdc353df7ef5a09b3502df6046054531
-Size (tinyproxy-1.6.2.tar.gz) = 463274 bytes
-SHA1 (patch-aa) = e94f2410ae2b5dd94a1039e96635b32505de9f5d
-SHA1 (patch-ab) = b6a18b859cb3260c237a98745ca9e2d0e1a1b486
-SHA1 (patch-ac) = 12ebe959c626c14a8294a7d919eba6df8cf3e95b
+SHA1 (tinyproxy-1.8.3.tar.gz) = ebf4bda60ff2d0fdf1846467f07b3bbd9ef90faf
+RMD160 (tinyproxy-1.8.3.tar.gz) = 41cae4c8fcc99650a76d7bed52a379a9dd0faef0
+Size (tinyproxy-1.8.3.tar.gz) = 266744 bytes
+SHA1 (patch-docs_man5_tinyproxy.conf.txt.in) = 72e005318c6dbbbd940160c50258e437c46e130e
+SHA1 (patch-docs_man8_tinyproxy.txt.in) = ef1a2599b13907bdae60948c47f99bde826048d2
+SHA1 (patch-etc_Makefile.in) = e4d1184a73de138c6d8f244debba765efcb1f350
diff --git a/www/tinyproxy/patches/patch-aa b/www/tinyproxy/patches/patch-aa
deleted file mode 100644
index c76d5a9..0000000
--- a/www/tinyproxy/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Makefile.in.orig	2003-01-22 20:50:28.000000000 +0100
-+++ Makefile.in	2003-03-07 23:04:34.000000000 +0100
-@@ -298,7 +298,7 @@
- install-exec-am:
- install-exec: install-exec-recursive
- 
--install-data-am: install-data-local
-+install-data-am:
- install-data: install-data-recursive
- 
- install-am: all-am
diff --git a/www/tinyproxy/patches/patch-ab b/www/tinyproxy/patches/patch-ab
deleted file mode 100644
index c15a366..0000000
--- a/www/tinyproxy/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- doc/tinyproxy.8.orig	2001-08-27 17:45:31.000000000 +0200
-+++ doc/tinyproxy.8	2003-03-07 23:13:09.000000000 +0100
-@@ -41,7 +41,7 @@
- connections have been handled.
- .SH FILES
- .nf
--/etc/tinyproxy/tinyproxy.conf
-+@PKG_SYSCONFDIR@/tinyproxy.conf
- /var/run/tinyproxy.pid
- /var/log/tinyproxy.log
- .fi
diff --git a/www/tinyproxy/patches/patch-ac b/www/tinyproxy/patches/patch-ac
deleted file mode 100644
index 63b249a..0000000
--- a/www/tinyproxy/patches/patch-ac
+++ /dev/null
@@ -1,73 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2003/03/07 23:46:01 salo Exp $
-
---- doc/tinyproxy.conf.orig	2003-06-23 23:14:32.000000000 +0200
-+++ doc/tinyproxy.conf	2006-09-19 10:15:24.000000000 +0200
-@@ -6,8 +6,8 @@
- # Name of the user the tinyproxy daemon should switch to after the port
- # has been bound.
- #
--User nobody
--Group nogroup
-+User @TINYPROXY_USER@
-+Group @TINYPROXY_GROUP@
- 
- #
- # Port to listen on.
-@@ -40,31 +40,31 @@ Timeout 600
- #   /usr/share/tinyproxy
- #   /etc/tinyproxy
- #
--# ErrorFile 404 "/usr/share/tinyproxy/404.html"
--# ErrorFile 400 "/usr/share/tinyproxy/400.html"
--# ErrorFile 503 "/usr/share/tinyproxy/503.html"
--# ErrorFile 403 "/usr/share/tinyproxy/403.html"
--# ErrorFile 408 "/usr/share/tinyproxy/408.html"
-+# ErrorFile 404 "@DATADIR@/404.html"
-+# ErrorFile 400 "@DATADIR@/400.html"
-+# ErrorFile 503 "@DATADIR@/503.html"
-+# ErrorFile 403 "@DATADIR@/403.html"
-+# ErrorFile 408 "@DATADIR@/408.html"
- 
- # 
- # DefaultErrorFile: The HTML file that gets sent if there is no
- # HTML file defined with an ErrorFile keyword for the HTTP error
- # that has occured.
- #
--DefaultErrorFile "/usr/share/tinyproxy/default.html"
-+DefaultErrorFile "@DATADIR@/default.html"
- 
- #
- # StatFile: The HTML file that gets sent when a request is made
- # for the stathost.  If this file doesn't exist a basic page is
- # hardcoded in tinyproxy.
- #
--StatFile "/usr/share/tinyproxy/stats.html"
-+StatFile "@DATADIR@/stats.html"
- 
- #
- # Where to log the information. Either LogFile or Syslog should be set,
- # but not both.
- #
--Logfile "/var/log/tinyproxy.log"
-+Logfile "@VARBASE@/log/tinyproxy.log"
- # Syslog On
- 
- #
-@@ -85,7 +85,7 @@ LogLevel Info
- # PidFile: Write the PID of the main tinyproxy thread to this file so it
- # can be used for signalling purposes.
- #
--PidFile "/var/run/tinyproxy.pid"
-+PidFile "@VARBASE@/run/tinyproxy.pid"
- 
- #
- # Include the X-Tinyproxy header, which has the client's IP address when
-@@ -180,7 +180,7 @@ ViaProxyName "tinyproxy"
- #
- # The location of the filter file.
- #
--#Filter "/etc/tinyproxy/filter"
-+#Filter "@PKG_SYSCONFDIR@/filter"
- 
- #
- # Filter based on URLs rather than domains.
diff --git a/www/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in b/www/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in
new file mode 100644
index 0000000..725adac
--- /dev/null
+++ b/www/tinyproxy/patches/patch-docs_man5_tinyproxy.conf.txt.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- docs/man5/tinyproxy.conf.txt.in.orig	2011-08-16 12:14:34.000000000 +0000
++++ docs/man5/tinyproxy.conf.txt.in
+@@ -19,7 +19,7 @@ DESCRIPTION
+ -----------
+ 
+ `tinyproxy(8)` reads its configuration file, typically stored in
+-`/etc/tinyproxy/tinyproxy.conf` (or passed to Tinyproxy with -c on the
++`@PKG_SYSCONFDIR@/tinyproxy.conf` (or passed to Tinyproxy with -c on the
+ command line). This manpage describes the syntax and contents of the
+ configuration file.
+ 
diff --git a/www/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in b/www/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in
new file mode 100644
index 0000000..cc22b35
--- /dev/null
+++ b/www/tinyproxy/patches/patch-docs_man8_tinyproxy.txt.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- docs/man8/tinyproxy.txt.in.orig	2012-10-04 11:35:55.807186000 +0000
++++ docs/man8/tinyproxy.txt.in
+@@ -130,7 +130,7 @@ configuration variable `StatFile`.
+ FILES
+ -----
+ 
+-`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy/tinyproxy.pid`, `/var/log/tinyproxy/tinyproxy.log`
++`@PKG_SYSCONFDIR@/tinyproxy.conf`, `@VARBASE@/run/tinyproxy/tinyproxy.pid`, `@VARBASE@/log/tinyproxy/tinyproxy.log`
+ 
+ BUGS
+ ----
diff --git a/www/tinyproxy/patches/patch-etc_Makefile.in b/www/tinyproxy/patches/patch-etc_Makefile.in
new file mode 100644
index 0000000..9249303
--- /dev/null
+++ b/www/tinyproxy/patches/patch-etc_Makefile.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- etc/Makefile.in.orig	2012-10-04 23:12:45.697375000 +0000
++++ etc/Makefile.in
+@@ -355,7 +355,7 @@ install-dvi: install-dvi-am
+ 
+ install-dvi-am:
+ 
+-install-exec-am: install-sysconfDATA
++install-exec-am:
+ 
+ install-html: install-html-am
+ 
