aboutsummaryrefslogtreecommitdiffstats
path: root/security/dns-proxy-tor
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-04-03 20:06:03 +0800
committerrafan <rafan@FreeBSD.org>2007-04-03 20:06:03 +0800
commit68ad03b58de7ad462bbbad217d90671ccdb338bc (patch)
tree44de0874ac1d656a62b64d3ff01ec8663df5777e /security/dns-proxy-tor
parentfbcc17359ea6d93eb8b6241b8023fa2a8fcf2ab7 (diff)
downloadfreebsd-ports-gnome-68ad03b58de7ad462bbbad217d90671ccdb338bc.tar.gz
freebsd-ports-gnome-68ad03b58de7ad462bbbad217d90671ccdb338bc.tar.zst
freebsd-ports-gnome-68ad03b58de7ad462bbbad217d90671ccdb338bc.zip
- Turn tor dependency into OPTIONS
- Detect installed tor version - Correct pkg-plist when NOPORTDOCS - Remove unnecessary DOCSDIR - Use NO_BUILD instead of empty do-build target PR: ports/111148 (based on) Approved by: Fabian Keil <fk at fabiankeil.de> (maintainer)
Diffstat (limited to 'security/dns-proxy-tor')
-rw-r--r--security/dns-proxy-tor/Makefile38
-rw-r--r--security/dns-proxy-tor/pkg-plist2
2 files changed, 35 insertions, 5 deletions
diff --git a/security/dns-proxy-tor/Makefile b/security/dns-proxy-tor/Makefile
index 8665a9574f74..41697786abfa 100644
--- a/security/dns-proxy-tor/Makefile
+++ b/security/dns-proxy-tor/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dns-proxy-tor
PORTVERSION= 0.1.0
+PORTREVISION= 1
CATEGORIES= security dns
MASTER_SITES= http://p56soo2ibjkx23xo.onion/ \
http://www.fabiankeil.de/sourcecode/freebsd/
@@ -15,16 +16,45 @@ DISTNAME= trans-proxy-tor-${PORTVERSION}
MAINTAINER= fk@fabiankeil.de
COMMENT= Resolves DNS requests through Tor
-RUN_DEPENDS= ${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
USE_PERL5_RUN= yes
USE_RC_SUBR= ${PORTNAME}
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}
+NO_BUILD= yes
+
SUB_FILES= pkg-message
-do-build:
+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)" On
+.else
+OPTIONS= TOR "Depend on tor (already installed)" On
+.endif
+
+.else
+
+OPTIONS= TOR_DEVEL "Depend on tor-devel" On \
+ TOR "Depend on tor" Off
+
+.endif
+
+.include <bsd.port.pre.mk>
+
+.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
+
pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
${INSTALL} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
@@ -42,4 +72,4 @@ post-install:
${CHOWN} _dns-proxy-tor:_dns-proxy-tor ${PREFIX}/var/run/${PORTNAME}
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/security/dns-proxy-tor/pkg-plist b/security/dns-proxy-tor/pkg-plist
index 75046c5331aa..a80dda561bc8 100644
--- a/security/dns-proxy-tor/pkg-plist
+++ b/security/dns-proxy-tor/pkg-plist
@@ -3,7 +3,7 @@ bin/dns-proxy-tor
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/changelog
%%PORTDOCS%%%%DOCSDIR%%/filter-examples
-@dirrmtry %%PORTDOCS%%%%DOCSDIR%%
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
@exec mkdir -p %D/var/run/dns-proxy-tor
@exec chown _dns-proxy-tor:_dns-proxy-tor %D/var/run/dns-proxy-tor
@dirrmtry var/run/dns-proxy-tor