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

Contents of /net-misc/tor/tor-0.2.4.14_alpha.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jul 6 16:53:59 2013 UTC (15 months, 2 weeks ago) by blueness
Branch: MAIN
Changes since 1.1: +2 -1 lines
Depend on dev-libs/libevent[ssl] when USE=bufferevents, bug #475756

(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2013 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.4.14_alpha.ebuild,v 1.1 2013/06/19 10:27:52 blueness Exp $
4
5 EAPI="4"
6
7 inherit 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="https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
14 S="${WORKDIR}/${MY_PF}"
15
16 LICENSE="BSD GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
19 IUSE="-bufferevents +ecc nat-pmp selinux stats tor-hardening transparent-proxy threads upnp web"
20
21 DEPEND="dev-libs/openssl
22 sys-libs/zlib
23 dev-libs/libevent
24 bufferevents? ( dev-libs/libevent[ssl] )
25 nat-pmp? ( net-libs/libnatpmp )
26 upnp? ( net-libs/miniupnpc )
27 selinux? ( sec-policy/selinux-tor )"
28 RDEPEND="${DEPEND}"
29
30 pkg_setup() {
31 enewgroup tor
32 enewuser tor -1 -1 /var/lib/tor tor
33 }
34
35 src_prepare() {
36 epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
37 }
38
39 src_configure() {
40 # Upstream isn't sure of all the user provided CFLAGS that
41 # will break tor, but does recommend against -fstrict-aliasing.
42 # We'll filter-flags them here as we encounter them.
43 filter-flags -fstrict-aliasing
44 econf \
45 --disable-buf-freelists \
46 --enable-asciidoc \
47 --docdir=/usr/share/doc/${PF} \
48 $(use_enable stats instrument-downloads) \
49 $(use_enable bufferevents) \
50 $(use_enable ecc curve25519) \
51 $(use_enable nat-pmp) \
52 $(use_enable tor-hardening gcc-hardening) \
53 $(use_enable tor-hardening linker-hardening) \
54 $(use_enable transparent-proxy transparent) \
55 $(use_enable threads) \
56 $(use_enable upnp) \
57 $(use_enable web tor2web-mode)
58 }
59
60 src_install() {
61 newconfd "${FILESDIR}"/tor.confd tor
62 newinitd "${FILESDIR}"/tor.initd-r6 tor
63
64 emake DESTDIR="${D}" install
65
66 keepdir /var/lib/tor
67
68 dodoc README ChangeLog ReleaseNotes doc/HACKING
69
70 fperms 750 /var/lib/tor
71 fowners tor:tor /var/lib/tor
72
73 insinto /etc/tor/
74 newins "${FILESDIR}"/torrc-r1 torrc
75 }
76
77 pkg_postinst() {
78 elog
79 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
80 elog "change it according to your needs. Use the torrc.sample that is in"
81 elog "that directory as a guide. Also, to have privoxy work with tor"
82 elog "just add the following line"
83 elog
84 elog "forward-socks4a / localhost:9050 ."
85 elog
86 elog "to /etc/privoxy/config. Notice the . at the end!"
87 elog
88 }

  ViewVC Help
Powered by ViewVC 1.1.20