/[gentoo-x86]/net-misc/tor/tor-0.2.3.2_alpha-r2.ebuild
Gentoo

Contents of /net-misc/tor/tor-0.2.3.2_alpha-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Sep 4 14:17:24 2011 UTC (3 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Removed old alpha version

(Portage version: 2.1.10.11/cvs/Linux x86_64)

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.2_alpha-r2.ebuild,v 1.2 2011/07/30 10:28:35 blueness Exp $
4
5 EAPI=4
6
7 inherit autotools 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 DEPEND="dev-libs/openssl
21 >=dev-libs/libevent-2.0
22 nat-pmp? ( net-libs/libnatpmp )
23 upnp? ( <net-libs/miniupnpc-1.6 )"
24
25 # The tordns patch for tsocks avoids some leakage of information thus raising anonymity
26 RDEPEND="${DEPEND}
27 net-proxy/tsocks[tordns]"
28
29 pkg_setup() {
30 enewgroup tor
31 enewuser tor -1 -1 /var/lib/tor tor
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
36 epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch
37 epatch "${FILESDIR}"/${PN}-0.2.3.2_alpha-fix-asneeded.patch
38
39 einfo "Regenerating autotools files ..."
40 epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch
41 eautoreconf || die "eautoreconf failed"
42 }
43
44 src_configure() {
45 # Upstream isn't sure of all the user provided CFLAGS that
46 # will break tor, but does recommend against -fstrict-aliasing.
47 # We'll filter-flags them here as we encounter them.
48 filter-flags -fstrict-aliasing
49 econf --docdir=/usr/share/doc/${PF} \
50 $(use_enable bufferevents) \
51 $(use_enable doc asciidoc) \
52 $(use_enable nat-pmp) \
53 $(use_enable tor-hardening gcc-hardening) \
54 $(use_enable tor-hardening linker-hardening)\
55 $(use_enable transparent-proxy transparent) \
56 $(use_enable threads) \
57 $(use_enable upnp)
58 }
59
60 src_install() {
61 newconfd "${FILESDIR}"/tor.confd tor
62 newinitd "${FILESDIR}"/tor.initd-r4 tor
63 emake DESTDIR="${D}" install || die
64 keepdir /var/{lib,log,run}/tor
65
66 dodoc README ChangeLog ReleaseNotes \
67 doc/{HACKING,TODO} \
68 doc/spec/README
69
70 fperms 750 /var/lib/tor /var/log/tor
71 fperms 755 /var/run/tor
72 fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
73
74 insinto /etc/tor/
75 doins "${FILESDIR}"/torrc
76
77 insinto /etc/logrotate.d
78 newins contrib/tor.logrotate tor
79 }
80
81 pkg_postinst() {
82 elog
83 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
84 elog "change it according to your needs. Use the torrc.sample that is in"
85 elog "that directory as a guide. Also, to have privoxy work with tor"
86 elog "just add the following line"
87 elog
88 elog "forward-socks4a / localhost:9050 ."
89 elog
90 elog "to /etc/privoxy/config. Notice the . at the end!"
91 elog
92 }

  ViewVC Help
Powered by ViewVC 1.1.20