/[gentoo-x86]/net-misc/tor/tor-0.2.3.10_alpha-r1.ebuild
Gentoo

Contents of /net-misc/tor/tor-0.2.3.10_alpha-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Dec 30 15:29:06 2011 UTC (7 years, 9 months ago) by blueness
Branch: MAIN
Relax version for dependency on net-libs/miniupnpc

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/net-misc/tor/tor-0.2.3.10_alpha.ebuild,v 1.1 2011/12/16 21:26:54 blueness Exp $
4    
5     EAPI="4"
6    
7     inherit eutils flag-o-matic versionator
8    
9     MY_PV="$(replace_version_separator 4 -)"
10     MY_PF="${PN}-${MY_PV}"
11     DESCRIPTION="Anonymizing overlay network for TCP"
12     HOMEPAGE="http://www.torproject.org/"
13     SRC_URI="http://www.torproject.org/dist/${MY_PF}.tar.gz"
14     S="${WORKDIR}/${MY_PF}"
15    
16     LICENSE="BSD"
17     SLOT="0"
18     KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
19     IUSE="+bufferevents doc nat-pmp tor-hardening transparent-proxy threads upnp"
20    
21     DEPEND="dev-libs/openssl
22     >=dev-libs/libevent-2.0.14
23     nat-pmp? ( net-libs/libnatpmp )
24     upnp? ( net-libs/miniupnpc )"
25     RDEPEND="${DEPEND}"
26    
27     pkg_setup() {
28     enewgroup tor
29     enewuser tor -1 -1 /var/lib/tor tor
30     }
31    
32     src_prepare() {
33     epatch "${FILESDIR}"/torrc.sample.patch
34     }
35    
36     src_configure() {
37     # Upstream isn't sure of all the user provided CFLAGS that
38     # will break tor, but does recommend against -fstrict-aliasing.
39     # We'll filter-flags them here as we encounter them.
40     filter-flags -fstrict-aliasing
41     econf --docdir=/usr/share/doc/${PF} \
42     $(use_enable bufferevents) \
43     $(use_enable doc asciidoc) \
44     $(use_enable nat-pmp) \
45     $(use_enable tor-hardening gcc-hardening) \
46     $(use_enable tor-hardening linker-hardening) \
47     $(use_enable transparent-proxy transparent) \
48     $(use_enable threads) \
49     $(use_enable upnp)
50     }
51    
52     src_install() {
53     newconfd "${FILESDIR}"/tor.confd tor
54     newinitd "${FILESDIR}"/tor.initd-r6 tor
55     emake DESTDIR="${D}" install
56     keepdir /var/lib/tor
57    
58     dodoc README ChangeLog ReleaseNotes \
59     doc/{HACKING,TODO} \
60     doc/spec/README
61    
62     fperms 750 /var/lib/tor
63     fowners tor:tor /var/lib/tor
64    
65     insinto /etc/tor/
66     newins "${FILESDIR}"/torrc-r1 torrc
67     }
68    
69     pkg_postinst() {
70     elog
71     elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
72     elog "change it according to your needs. Use the torrc.sample that is in"
73     elog "that directory as a guide. Also, to have privoxy work with tor"
74     elog "just add the following line"
75     elog
76     elog "forward-socks4a / localhost:9050 ."
77     elog
78     elog "to /etc/privoxy/config. Notice the . at the end!"
79     elog
80     }

  ViewVC Help
Powered by ViewVC 1.1.20