mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
- Convert to OptionsNG [1]
- Use libtoolize for autotools [1] - Trim Makefile header [1] - Add LICENSE (GPLv2) - Use PORTDOCS at Makefile - Remove PORTEXAMPLES (sample conf same as original) PR: ports/177113 [1] Submitted by: Andrei Lavreniyuk <andy.lavr@gmail.com> (maintainer) [1] Approved by: jpaetzel (mentor)
This commit is contained in:
parent
cbfd4bd46c
commit
1d757bfcf8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319134
@ -1,20 +1,19 @@
|
||||
# New ports collection makefile for: torsocks
|
||||
# Date created: 13 February 2009
|
||||
# Whom: Andrei Lavreniyuk <andy.lavr@gmail.com>
|
||||
#
|
||||
# Created by: Andrei Lavreniyuk <andy.lavr@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= torsocks
|
||||
PORTVERSION= 1.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net security
|
||||
MASTER_SITES= GOOGLE_CODE \
|
||||
http://tor.reactor-xg.kiev.ua/files/
|
||||
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= andy.lavr@gmail.com
|
||||
COMMENT= Most SOCKS-friendly applications way with Tor
|
||||
|
||||
USE_AUTOTOOLS= libtool aclocal autoconf
|
||||
LICENSE= GPLv2
|
||||
|
||||
USE_AUTOTOOLS= libtool aclocal autoconf libtoolize
|
||||
ACLOCAL_ARGS= -I ${LOCALBASE}/share/aclocal
|
||||
|
||||
USE_GMAKE= yes
|
||||
@ -26,35 +25,28 @@ MAN8= torsocks.8
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
OPTIONS= SOCKSDNS "Use socks server for DNS lookups" off \
|
||||
OLDMETHOD "Do not use RTLD_NEXT parameter to dlsym" off \
|
||||
NODEBUG "Disable output of error messages" off \
|
||||
HOSTNAMES "Enable DNS lookups of socks server" off
|
||||
OPTIONS_DEFINE= OLDMETHOD NODEBUG DOCS
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
OPTIONS_SINGLE= DNS
|
||||
OPTIONS_SINGLE_DNS= DEFAULT SOCKSDNS HOSTNAMES
|
||||
|
||||
.if defined(WITH_SOCKSDNS)
|
||||
SOCKSDNS_DESC= Use socks server for DNS lookups
|
||||
OLDMETHOD_DESC= Do not use RTLD_NEXT parameter to dlsym
|
||||
NODEBUG_DESC= Disable output of error messages
|
||||
HOSTNAMES_DESC= Enable DNS lookups of socks server
|
||||
DOCS_DESC= Install examples and docs
|
||||
DEFAULT_DESC= DNS lookups default
|
||||
|
||||
OPTIONS_DEFAULT= DOCS DEFAULT
|
||||
|
||||
PORTDOCS= INSTALL README TODO ChangeLog
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MSOCKSDNS}
|
||||
CONFIGURE_ARGS+= --enable-socksdns
|
||||
.endif
|
||||
|
||||
.if defined(WITH_OLDMETHOD)
|
||||
CONFIGURE_ARGS+= --enable-oldmethod
|
||||
.endif
|
||||
|
||||
.if defined(WITH_NODEBUG)
|
||||
CONFIGURE_ARGS+= --disable-debug
|
||||
.endif
|
||||
|
||||
.if defined(WITH_HOSTNAMES)
|
||||
CONFIGURE_ARGS+= --enable-hostnames
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SOCKSDNS) && defined(WITH_HOSTNAMES)
|
||||
BROKEN= HOSTNAMES option is not allowed when SOCKSDNS option is enabled
|
||||
.endif
|
||||
|
||||
pre-everything::
|
||||
.if !defined(WITH_SOCKSDNS)
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "You can use the SOCKSDNS option."
|
||||
@${ECHO_MSG} "This option causes torsocks to intercept"
|
||||
@ -64,7 +56,10 @@ pre-everything::
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
|
||||
.if !defined(WITH_OLDMETHOD)
|
||||
.if ${PORT_OPTIONS:MOLDMETHOD}
|
||||
CONFIGURE_ARGS+= --enable-oldmethod
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "You can use the OLDMETHOD option."
|
||||
@${ECHO_MSG} "This forces torsocks not to use the"
|
||||
@ -75,7 +70,10 @@ pre-everything::
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
|
||||
.if !defined(WITH_NODEBUG)
|
||||
.if ${PORT_OPTIONS:MNODEBUG}
|
||||
CONFIGURE_ARGS+= --disable-debug
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "You can use the NODEBUG option."
|
||||
@${ECHO_MSG} "This configuration option tells torsocks"
|
||||
@ -83,7 +81,10 @@ pre-everything::
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
|
||||
.if !defined(WITH_HOSTNAMES)
|
||||
.if ${PORT_OPTIONS:MHOSTNAMES}
|
||||
CONFIGURE_ARGS+= --enable-hostnames
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "You can use the HOSTNAMES option."
|
||||
@${ECHO_MSG} "This enables DNS lookups on names"
|
||||
@ -99,17 +100,16 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's|@prefix@|${PREFIX}|' ${WRKSRC}/src/torsocks.in
|
||||
@${REINPLACE_CMD} -e 's|MAP_ANONYMOUS|MAP_ANON|' ${WRKSRC}/src/dead_pool.c
|
||||
@${MV} ${WRKSRC}/doc/torsocks.conf ${WRKSRC}/doc/torsocks.conf.sample
|
||||
@${MV} ${WRKSRC}/configure.in ${WRKSRC}/configure.ac
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
@${MKDIR} ${EXAMPLESDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.sample ${EXAMPLESDIR}
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*.sample ${PREFIX}/etc
|
||||
.endif
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
|
||||
.for f in ${PORTDOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,10 +1,9 @@
|
||||
--- src/Makefile.am.orig 2011-10-24 22:26:34.000000000 +0300
|
||||
+++ src/Makefile.am 2011-11-09 12:36:55.697224889 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile used by configure to create real Makefile
|
||||
--- Makefile.am.orig 2011-03-05 18:38:11.000000000 +0200
|
||||
+++ Makefile.am 2013-03-20 10:13:28.517831100 +0200
|
||||
@@ -2,4 +2,6 @@
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
-libdir = @libdir@/torsocks
|
||||
+libdir = @prefix@/lib
|
||||
|
||||
# Install invocation scripts
|
||||
bin_SCRIPTS = torsocks usewithtor
|
||||
+ACLOCAL_AMFLAGS= -I m4
|
||||
+
|
||||
SUBDIRS = src doc test
|
||||
|
20
net/torsocks/files/patch-configure.in
Normal file
20
net/torsocks/files/patch-configure.in
Normal file
@ -0,0 +1,20 @@
|
||||
--- configure.in.orig 2011-10-24 22:30:58.000000000 +0300
|
||||
+++ configure.in 2013-03-20 10:10:59.362840661 +0200
|
||||
@@ -3,13 +3,14 @@
|
||||
##############################################################################
|
||||
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
-AC_INIT()
|
||||
+AC_INIT([torsocks], [1.2])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Create a config.g file to store defines generated by configure
|
||||
-AC_CONFIG_HEADER(config.h)
|
||||
+AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Automake initialization
|
||||
-AM_INIT_AUTOMAKE(torsocks, 1.2)
|
||||
+AM_INIT_AUTOMAKE()
|
||||
|
||||
# Get hostname and other information.
|
||||
AC_CANONICAL_HOST
|
10
net/torsocks/files/patch-src_Makefile.am
Normal file
10
net/torsocks/files/patch-src_Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/Makefile.am.orig 2011-10-24 22:26:34.000000000 +0300
|
||||
+++ src/Makefile.am 2011-11-09 12:36:55.697224889 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile used by configure to create real Makefile
|
||||
|
||||
-libdir = @libdir@/torsocks
|
||||
+libdir = @prefix@/lib
|
||||
|
||||
# Install invocation scripts
|
||||
bin_SCRIPTS = torsocks usewithtor
|
@ -1,6 +1,4 @@
|
||||
Simple setup file was copied to %%PREFIX%%/etc/torsocks.conf.sample
|
||||
An example of a more complex setup file can be found in
|
||||
%%PREFIX%%/share/examples/torsocks/
|
||||
|
||||
Once you have installed torsocks, just launch it like so:
|
||||
usewithtor [application]
|
||||
|
@ -5,24 +5,20 @@ lib/libtorsocks.a
|
||||
lib/libtorsocks.la
|
||||
lib/libtorsocks.so
|
||||
lib/libtorsocks.so.1
|
||||
share/torsocks/DEBUG
|
||||
share/torsocks/README
|
||||
share/torsocks/README.TORDNS
|
||||
share/torsocks/SOCKS4.protocol
|
||||
share/torsocks/SOCKS5
|
||||
share/torsocks/compilewarnings.patch
|
||||
share/torsocks/conffile.patch
|
||||
share/torsocks/getaddrbyhost.patch
|
||||
share/torsocks/getpeername.patch
|
||||
share/torsocks/infiniteloop.patch
|
||||
share/torsocks/localaddresses.patch
|
||||
share/torsocks/socks-extensions.txt
|
||||
share/torsocks/tordns.patch
|
||||
share/torsocks/test/expectedresults.txt
|
||||
share/torsocks/test/run_tests.sh
|
||||
@dirrm share/torsocks/test
|
||||
@dirrm share/torsocks
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/torsocks.conf.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
|
||||
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
%%DATADIR%%/DEBUG
|
||||
%%DATADIR%%/README
|
||||
%%DATADIR%%/README.TORDNS
|
||||
%%DATADIR%%/SOCKS4.protocol
|
||||
%%DATADIR%%/SOCKS5
|
||||
%%DATADIR%%/compilewarnings.patch
|
||||
%%DATADIR%%/conffile.patch
|
||||
%%DATADIR%%/getaddrbyhost.patch
|
||||
%%DATADIR%%/getpeername.patch
|
||||
%%DATADIR%%/infiniteloop.patch
|
||||
%%DATADIR%%/localaddresses.patch
|
||||
%%DATADIR%%/socks-extensions.txt
|
||||
%%DATADIR%%/tordns.patch
|
||||
%%DATADIR%%/test/expectedresults.txt
|
||||
%%DATADIR%%/test/run_tests.sh
|
||||
@dirrm %%DATADIR%%/test
|
||||
@dirrm %%DATADIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user