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

Contents of /net-misc/tor/tor-0.2.2.35.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat Sep 15 02:04:18 2012 UTC (2 years, 2 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Remove older vulnerable versions

(Portage version: 2.1.11.9/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20