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

Contents of /net-misc/tor/tor-0.2.1.30-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jun 10 09:29:17 2011 UTC (4 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump beta, and removed deprecated

(Portage version: 2.1.9.42/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.1.30-r1.ebuild,v 1.1 2011/04/10 17:42:03 blueness Exp $
4
5 EAPI=2
6
7 inherit autotools eutils flag-o-matic
8
9 DESCRIPTION="Anonymizing overlay network for TCP"
10 HOMEPAGE="http://www.torproject.org/"
11 MY_PV=${PV/_/-}
12 SRC_URI="http://www.torproject.org/dist/${PN}-${MY_PV}.tar.gz"
13 S="${WORKDIR}/${PN}-${MY_PV}"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
18 IUSE="debug"
19
20 DEPEND="dev-libs/openssl
21 >=dev-libs/libevent-1.2"
22 # The tordns patch for tsocks avoids some leakage of information thus raising anonymity
23 RDEPEND="${DEPEND}
24 net-proxy/tsocks[tordns]"
25
26 pkg_setup() {
27 enewgroup tor
28 enewuser tor -1 -1 /var/lib/tor tor
29 }
30
31 src_prepare() {
32 epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
33 epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch
34
35 einfo "Regenerating autotools files ..."
36 epatch "${FILESDIR}"/${PN}-0.2.1.30-respect-CFLAGS.patch
37 eautoreconf || die "eautoreconf failed"
38
39 # Normally tor uses a bundled libevent fragment to provide
40 # asynchronous DNS requests. This is generally a bad idea, but at
41 # the moment the official libevent does not have the 0x20 hack, so
42 # anonymity is higher with the bundled variant. Remove patch as
43 # soon as upstream has installed the autoconf option to use
44 # system's libevent. This hasn't happened, so we
45 # have to live with the bundled libevent for this release, as the
46 # current version in tree won't suffice for tor to build
47 # See http://bugs.noreply.org/flyspray/index.php?do=details&id=920
48 # for upstream's report
49 # Let's revisit this when libevent-2* is unmasked
50 # use bundledlibevent || epatch "${FILESDIR}"/${PN}-0.2.1.5-no-internal-libevent.patch
51 }
52
53 src_configure() {
54 # Upstream isn't sure of all the user provided CFLAGS that
55 # will break tor, but does recommend against -fstrict-aliasing.
56 # We'll filter-flags them here as we encounter them.
57 filter-flags -fstrict-aliasing
58 econf $(use_enable debug)
59 }
60
61 src_install() {
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 AUTHORS ReleaseNotes \
67 doc/{HACKING,TODO}
68
69 fperms 750 /var/lib/tor /var/log/tor
70 fperms 755 /var/run/tor
71 fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
72
73 insinto /etc/tor/
74 doins "${FILESDIR}"/torrc
75
76 insinto /etc/logrotate.d
77 newins contrib/tor.logrotate tor
78
79 # allow the tor user more open files to avoid errors, see bug 251171
80 insinto /etc/security/limits.d/
81 doins "${FILESDIR}"/tor.conf
82 }
83
84 pkg_postinst() {
85 elog
86 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
87 elog "change it according to your needs. Use the torrc.sample that is in"
88 elog "that directory as a guide. Also, to have privoxy work with tor"
89 elog "just add the following line"
90 elog
91 elog "forward-socks4a / localhost:9050 ."
92 elog
93 elog "to /etc/privoxy/config. Notice the . at the end!"
94 elog
95 }

  ViewVC Help
Powered by ViewVC 1.1.20