aboutsummaryrefslogtreecommitdiffstats
path: root/security/trans-proxy-tor
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-04-03 20:08:12 +0800
committerrafan <rafan@FreeBSD.org>2007-04-03 20:08:12 +0800
commitf7bea8b795bb15595fd215b5b7c6783d1e9af4ec (patch)
treeeaa9821684fbfd5b88785aa868dde8acc1fe0681 /security/trans-proxy-tor
parent68ad03b58de7ad462bbbad217d90671ccdb338bc (diff)
downloadfreebsd-ports-gnome-f7bea8b795bb15595fd215b5b7c6783d1e9af4ec.tar.gz
freebsd-ports-gnome-f7bea8b795bb15595fd215b5b7c6783d1e9af4ec.tar.zst
freebsd-ports-gnome-f7bea8b795bb15595fd215b5b7c6783d1e9af4ec.zip
- Turn tor and dns-proxy-tor dependencies into OPTIONS
- Detect installed tor version - Correct pkg-plist when NOPORTDOCS - Use NO_BUILD instead of empty do-build target - Mark as deprecated in favour of Tor's TransPort option PR: ports/111149 (based on) Approved by: Fabian Keil <fk at fabiankeil.de> (maintainer)
Diffstat (limited to 'security/trans-proxy-tor')
-rw-r--r--security/trans-proxy-tor/Makefile45
-rw-r--r--security/trans-proxy-tor/pkg-plist2
2 files changed, 41 insertions, 6 deletions
diff --git a/security/trans-proxy-tor/Makefile b/security/trans-proxy-tor/Makefile
index 9f0a1ddd4f8f..8d5aeb7f2755 100644
--- a/security/trans-proxy-tor/Makefile
+++ b/security/trans-proxy-tor/Makefile
@@ -7,6 +7,7 @@
PORTNAME= trans-proxy-tor
PORTVERSION= 0.1.0
+PORTREVISION= 1
CATEGORIES= security net
MASTER_SITES= http://p56soo2ibjkx23xo.onion/ \
http://www.fabiankeil.de/sourcecode/freebsd/
@@ -14,18 +15,53 @@ MASTER_SITES= http://p56soo2ibjkx23xo.onion/ \
MAINTAINER= fk@fabiankeil.de
COMMENT= Transparent proxy used to redirect TCP connections into Tor
-RUN_DEPENDS= ${LOCALBASE}/bin/dns-proxy-tor:${PORTSDIR}/security/dns-proxy-tor \
- ${SITE_PERL}/${PERL_ARCH}/Event/Lib.pm:${PORTSDIR}/devel/p5-Event-Lib \
- ${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
+RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Event/Lib.pm:${PORTSDIR}/devel/p5-Event-Lib
USE_PERL5_RUN= yes
USE_RC_SUBR= ${PORTNAME}
SUB_FILES= pkg-message
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}
+
+NO_BUILD= yes
+
+DEPRECATED= trans-proxy-tor is rendered obsolete by Tor\'s TransPort option \
+ (currently only available in tor-devel)
+
+OPTIONS= DNS_PROXY_TOR "Depend on dns-proxy-tor" On
+
+HAVE_TOR!= if pkg_info -I tor-\* >/dev/null 2>&1 ; then ${ECHO} YES; fi
+.if ${HAVE_TOR} == "YES"
+HAVE_TOR_DEVEL!= if pkg_info -I tor-devel\* >/dev/null 2>&1 ; then ${ECHO} YES; fi
+
+.if ${HAVE_TOR_DEVEL} == "YES"
+OPTIONS+= TOR_DEVEL "Depend on tor-devel (already installed)" Off
+.else
+OPTIONS+= TOR "Depend on tor (already installed)" Off
+.endif
+
+.else
+
+OPTIONS+= TOR_DEVEL "Depend on tor-devel" Off
+OPTIONS+= TOR "Depend on tor" Off
+
+.endif
.include <bsd.port.pre.mk>
+.if defined(WITH_DNS_PROXY_TOR)
+RUN_DEPENDS+= ${LOCALBASE}/bin/dns-proxy-tor:${PORTSDIR}/security/dns-proxy-tor
+.endif
+
+.if defined(WITH_TOR_DEVEL)
+.if defined(WITH_TOR)
+IGNORE= cannot depend on tor and tor-devel at the same time
+.endif
+
+RUN_DEPENDS+= ${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
+.elif defined(WITH_TOR)
+RUN_DEPENDS+= ${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor
+.endif
+
.if defined(NO_PF)
IGNORE= requires PF
.endif
@@ -34,7 +70,6 @@ IGNORE= requires PF
IGNORE= requires PF which is not available on FreeBSD versions below 5.3
.endif
-do-build:
pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
diff --git a/security/trans-proxy-tor/pkg-plist b/security/trans-proxy-tor/pkg-plist
index b11983cd88b1..a34452747479 100644
--- a/security/trans-proxy-tor/pkg-plist
+++ b/security/trans-proxy-tor/pkg-plist
@@ -3,7 +3,7 @@ bin/trans-proxy-tor
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/changelog
%%PORTDOCS%%%%DOCSDIR%%/filter-examples
-@dirrmtry %%PORTDOCS%%%%DOCSDIR%%
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
@exec mkdir -p %D/var/run/trans-proxy-tor
@exec chown _trans-proxy-tor:_trans-proxy-tor %D/var/run/trans-proxy-tor
@dirrmtry var/run/trans-proxy-tor