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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Jan 24 11:23:54 2012 UTC (2 years, 6 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Removed old vulnerable stable version

(Portage version: 2.1.10.41/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.34.ebuild,v 1.6 2011/11/26 16:50:24 xarthisius 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 RDEPEND="${DEPEND}"
24
25 pkg_setup() {
26 enewgroup tor
27 enewuser tor -1 -1 /var/lib/tor tor
28 }
29
30 src_prepare() {
31 epatch "${FILESDIR}"/torrc.sample.patch
32
33 einfo "Regenerating autotools files ..."
34 epatch "${FILESDIR}"/${PN}-0.2.2.24_alpha-respect-CFLAGS.patch
35 eautoreconf
36 }
37
38 src_configure() {
39 # Upstream isn't sure of all the user provided CFLAGS that
40 # will break tor, but does recommend against -fstrict-aliasing.
41 # We'll filter-flags them here as we encounter them.
42 filter-flags -fstrict-aliasing
43 econf --docdir=/usr/share/doc/${PF} \
44 $(use_enable doc asciidoc) \
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 }
50
51 src_install() {
52 newconfd "${FILESDIR}"/tor.confd tor
53 newinitd "${FILESDIR}"/tor.initd-r6 tor
54 emake DESTDIR="${D}" install
55 keepdir /var/lib/tor
56
57 dodoc README ChangeLog ReleaseNotes \
58 doc/{HACKING,TODO} \
59 doc/spec/README
60
61 fperms 750 /var/lib/tor
62 fowners tor:tor /var/lib/tor
63
64 insinto /etc/tor/
65 newins "${FILESDIR}"/torrc-r1 torrc
66 }
67
68 pkg_postinst() {
69 elog
70 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
71 elog "change it according to your needs. Use the torrc.sample that is in"
72 elog "that directory as a guide. Also, to have privoxy work with tor"
73 elog "just add the following line"
74 elog
75 elog "forward-socks4a / localhost:9050 ."
76 elog
77 elog "to /etc/privoxy/config. Notice the . at the end!"
78 elog
79 }

  ViewVC Help
Powered by ViewVC 1.1.20