aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2010-06-22 08:51:38 +0800
committerwxs <wxs@FreeBSD.org>2010-06-22 08:51:38 +0800
commitf6eba2244366b0e00f61892d0d9b95b94c6bdca3 (patch)
tree0a13bc80873eaa18fa326dee67f49fc3836e594f
parentc1b8b162f622ef7a6441d5dbbcc4a849e5de3733 (diff)
downloadfreebsd-ports-gnome-f6eba2244366b0e00f61892d0d9b95b94c6bdca3.tar.gz
freebsd-ports-gnome-f6eba2244366b0e00f61892d0d9b95b94c6bdca3.tar.zst
freebsd-ports-gnome-f6eba2244366b0e00f61892d0d9b95b94c6bdca3.zip
Update to 1.8.2.
Add transparent proxy support. Don't be so silent when building. Feature safe: yes
-rw-r--r--www/tinyproxy/Makefile39
-rw-r--r--www/tinyproxy/distinfo6
-rw-r--r--www/tinyproxy/files/patch-configure11
-rw-r--r--www/tinyproxy/files/patch-etc__Makefile.in15
-rw-r--r--www/tinyproxy/files/patch-src__main.c32
-rw-r--r--www/tinyproxy/pkg-plist8
6 files changed, 93 insertions, 18 deletions
diff --git a/www/tinyproxy/Makefile b/www/tinyproxy/Makefile
index d0521cf87a91..7a715422a8b6 100644
--- a/www/tinyproxy/Makefile
+++ b/www/tinyproxy/Makefile
@@ -6,25 +6,32 @@
#
PORTNAME= tinyproxy
-PORTVERSION= 1.6.5
+PORTVERSION= 1.8.2
PORTEPOCH= 1
CATEGORIES= www
-MASTER_SITES= https://www.banu.com/pub/tinyproxy/1.6/
+MASTER_SITES= https://www.banu.com/pub/tinyproxy/1.8/
MAINTAINER= wxs@FreeBSD.org
COMMENT= A small, efficient HTTP proxy server
+BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc\
+ xsltproc:${PORTSDIR}/textproc/libxslt\
+ xmllint:${PORTSDIR}/textproc/libxml2 \
+ ${LOCALBASE}/share/xsl/docbook/lib/lib.xsl:${PORTSDIR}/textproc/docbook-xsl
+
USE_RC_SUBR= tinyproxy.sh
GNU_CONFIGURE= yes
USE_GMAKE= yes
-CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
- --with-config=${PREFIX}/etc/tinyproxy.conf \
- --program-transform-name=""
MAKE_JOBS_SAFE= yes
+CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \
+ --program-transform-name="" \
+ --disable-silent-rules
MAN8= tinyproxy.8
+MAN5= tinyproxy.conf.5
-OPTIONS= REVERSE "Enable reverse proxy support" Off
+OPTIONS= REVERSE "Enable reverse proxy support" Off \
+ TRANSPARENT "Enable transparent proxy support" Off
.include <bsd.port.pre.mk>
@@ -32,16 +39,30 @@ OPTIONS= REVERSE "Enable reverse proxy support" Off
CONFIGURE_ARGS+= --enable-reverse
.endif
+.if defined(WITH_TRANSPARENT)
+CONFIGURE_ARGS+= --enable-transparent
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc/tinyproxy/tinyproxy.conf|${PREFIX}/etc/tinyproxy.conf|' \
- ${WRKSRC}/doc/tinyproxy.8
+ ${WRKSRC}/docs/man8/tinyproxy.txt.in
+ @${REINPLACE_CMD} -e 's|/var/run/tinyproxy/tinyproxy.pid|/var/run/tinyproxy.pid|' \
+ ${WRKSRC}/docs/man8/tinyproxy.txt.in
+ @${REINPLACE_CMD} -e 's|/var/log/tinyproxy/tinyproxy.log|/var/log/tinyproxy.log|' \
+ ${WRKSRC}/docs/man8/tinyproxy.txt.in
+ @${REINPLACE_CMD} -e 's|/etc/tinyproxy/tinyproxy.conf|${PREFIX}/etc/tinyproxy.conf|' \
+ ${WRKSRC}/docs/man5/tinyproxy.conf.txt.in
@${REINPLACE_CMD} -e 's|/usr/share/tinyproxy|${DATADIR}|' \
- ${WRKSRC}/doc/tinyproxy.conf
+ ${WRKSRC}/etc/tinyproxy.conf.in
+ @${REINPLACE_CMD} -e 's|/run/tinyproxy/|/run/|' \
+ ${WRKSRC}/etc/tinyproxy.conf.in
+ @${REINPLACE_CMD} -e 's|/log/tinyproxy/|/log/|' \
+ ${WRKSRC}/etc/tinyproxy.conf.in
post-install:
@if [ ! -f ${PREFIX}/etc/tinyproxy.conf ]; then \
- ${CP} -p ${PREFIX}/etc/tinyproxy.conf-dist \
+ ${CP} -p ${PREFIX}/etc/tinyproxy.conf.sample \
${PREFIX}/etc/tinyproxy.conf ; \
fi
diff --git a/www/tinyproxy/distinfo b/www/tinyproxy/distinfo
index 65e377343111..cc3d8496c425 100644
--- a/www/tinyproxy/distinfo
+++ b/www/tinyproxy/distinfo
@@ -1,3 +1,3 @@
-MD5 (tinyproxy-1.6.5.tar.gz) = 2b2862ba33d2939e4572688d442ba415
-SHA256 (tinyproxy-1.6.5.tar.gz) = d6449d8c2e9a5d4afb1a705c351d1de69d07d64554f48c43ac2cfd7883c03d04
-SIZE (tinyproxy-1.6.5.tar.gz) = 318645
+MD5 (tinyproxy-1.8.2.tar.gz) = 7066f8192ba1307f79b363f60968e552
+SHA256 (tinyproxy-1.8.2.tar.gz) = 5520f9b726f004b32abee621aad03ff0c8db2ba2680b7afba05dd6ccad1d6b14
+SIZE (tinyproxy-1.8.2.tar.gz) = 268190
diff --git a/www/tinyproxy/files/patch-configure b/www/tinyproxy/files/patch-configure
new file mode 100644
index 000000000000..dc134945c623
--- /dev/null
+++ b/www/tinyproxy/files/patch-configure
@@ -0,0 +1,11 @@
+--- ./configure.orig 2010-06-21 10:54:53.000000000 -0400
++++ ./configure 2010-06-21 10:55:11.000000000 -0400
+@@ -764,7 +764,7 @@
+ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+-localstatedir='${prefix}/var'
++localstatedir='/var'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
diff --git a/www/tinyproxy/files/patch-etc__Makefile.in b/www/tinyproxy/files/patch-etc__Makefile.in
new file mode 100644
index 000000000000..0b071ed4bd37
--- /dev/null
+++ b/www/tinyproxy/files/patch-etc__Makefile.in
@@ -0,0 +1,15 @@
+--- ./etc/Makefile.in.orig 2010-06-21 10:10:59.000000000 -0400
++++ ./etc/Makefile.in 2010-06-21 10:11:42.000000000 -0400
+@@ -248,8 +248,10 @@
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
+- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
++ nfile="$$files.sample"; \
++ cp $$files $$nfile; \
++ echo " $(INSTALL_DATA) $$nfile '$(DESTDIR)$(sysconfdir)'"; \
++ $(INSTALL_DATA) $$nfile "$(DESTDIR)$(sysconfdir)" || exit $$?; \
+ done
+
+ uninstall-sysconfDATA:
diff --git a/www/tinyproxy/files/patch-src__main.c b/www/tinyproxy/files/patch-src__main.c
new file mode 100644
index 000000000000..06e485e3bdba
--- /dev/null
+++ b/www/tinyproxy/files/patch-src__main.c
@@ -0,0 +1,32 @@
+--- ./src/main.c.orig 2010-06-21 13:39:34.000000000 -0400
++++ ./src/main.c 2010-06-21 13:40:20.000000000 -0400
+@@ -407,12 +407,9 @@
+ exit (EX_OSERR);
+ }
+
+- /* Switch to a different user if we're running as root */
+- if (geteuid () == 0)
+- change_user (argv[0]);
+- else
+- log_message (LOG_WARNING,
+- "Not running as root, so not changing UID/GID.");
++ /*To get this to run correctly on FreeBSD, we must
++ ceate the PID and log files before we drop privileges.
++ Other ideas are welcome */
+
+ /* Create log file after we drop privileges */
+ if (setup_logging ()) {
+@@ -427,6 +424,13 @@
+ exit (EX_OSERR);
+ }
+ }
++ /* Switch to a different user if we're running as root */
++ if (geteuid () == 0)
++ change_user (argv[0]);
++ else
++ log_message (LOG_WARNING,
++ "Not running as root, so not changing UID/GID.");
++
+
+ if (child_pool_create () < 0) {
+ fprintf (stderr,
diff --git a/www/tinyproxy/pkg-plist b/www/tinyproxy/pkg-plist
index 0d60bcea9692..5b619888edc2 100644
--- a/www/tinyproxy/pkg-plist
+++ b/www/tinyproxy/pkg-plist
@@ -1,12 +1,8 @@
-@unexec if cmp -s %D/etc/tinyproxy.conf-dist %D/etc/tinyproxy.conf; then rm -f %D/etc/tinyproxy.conf; fi
-etc/tinyproxy.conf-dist
+@unexec if cmp -s %D/etc/tinyproxy.conf.sample %D/etc/tinyproxy.conf; then rm -f %D/etc/tinyproxy.conf; fi
+etc/tinyproxy.conf.sample
@exec if [ ! -f %D/etc/tinyproxy.conf ] ; then cp -p %D/%F %B/tinyproxy.conf; fi
sbin/tinyproxy
-%%DATADIR%%/HTML_VARIABLES
%%DATADIR%%/debug.html
-%%DATADIR%%/debug.html.dist
%%DATADIR%%/default.html
-%%DATADIR%%/default.html.dist
%%DATADIR%%/stats.html
-%%DATADIR%%/stats.html.dist
@dirrm %%DATADIR%%