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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Sep 1 15:56:55 2011 UTC (2 years, 10 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Switch sanity check for /var/run/tor to checkpath

(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.2.32-r1.ebuild,v 1.1 2011/08/30 13:57:42 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="doc tor-hardening +transparent-proxy threads"
20
21 DEPEND="dev-libs/openssl
22 >=dev-libs/libevent-2.0"
23 # The tordns patch for tsocks avoids some leakage of information thus raising anonymity
24 RDEPEND="${DEPEND}
25 net-proxy/tsocks[tordns]"
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 einfo "Regenerating autotools files ..."
36 epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch
37 eautoreconf || die "eautoreconf failed"
38 }
39
40 src_configure() {
41 # Upstream isn't sure of all the user provided CFLAGS that
42 # will break tor, but does recommend against -fstrict-aliasing.
43 # We'll filter-flags them here as we encounter them.
44 filter-flags -fstrict-aliasing
45 econf --docdir=/usr/share/doc/${PF} \
46 $(use_enable doc asciidoc) \
47 $(use_enable tor-hardening gcc-hardening) \
48 $(use_enable tor-hardening linker-hardening)\
49 $(use_enable transparent-proxy transparent) \
50 $(use_enable threads)
51 }
52
53 src_install() {
54 newconfd "${FILESDIR}"/tor.confd tor
55 newinitd "${FILESDIR}"/tor.initd-r5 tor
56 emake DESTDIR="${D}" install || die
57 keepdir /var/{lib,run}/tor
58
59 dodoc README ChangeLog ReleaseNotes \
60 doc/{HACKING,TODO} \
61 doc/spec/README
62
63 fperms 750 /var/lib/tor
64 fperms 755 /var/run/tor
65 fowners tor:tor /var/lib/tor /var/run/tor
66
67 insinto /etc/tor/
68 newins "${FILESDIR}"/torrc-r1 torrc
69 }
70
71 pkg_postinst() {
72 elog
73 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
74 elog "change it according to your needs. Use the torrc.sample that is in"
75 elog "that directory as a guide. Also, to have privoxy work with tor"
76 elog "just add the following line"
77 elog
78 elog "forward-socks4a / localhost:9050 ."
79 elog
80 elog "to /etc/privoxy/config. Notice the . at the end!"
81 elog
82 }

  ViewVC Help
Powered by ViewVC 1.1.20