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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Oct 28 22:16:36 2013 UTC (6 years, 1 month ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Use readme.gentoo.eclass to limit elog, bug #489678

(Portage version: 2.2.7/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.5.1_alpha.ebuild,v 1.1 2013/10/02 10:15: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://www.torproject.org/dist/${MY_PF}.tar.gz
14 https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
15 S="${WORKDIR}/${MY_PF}"
16
17 LICENSE="BSD GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
20 IUSE="-bufferevents +ecc nat-pmp selinux stats tor-hardening transparent-proxy threads upnp web"
21
22 DEPEND="dev-libs/openssl
23 sys-libs/zlib
24 dev-libs/libevent
25 bufferevents? ( dev-libs/libevent[ssl] )
26 nat-pmp? ( net-libs/libnatpmp )
27 upnp? ( net-libs/miniupnpc )
28 selinux? ( sec-policy/selinux-tor )"
29 RDEPEND="${DEPEND}"
30
31 pkg_setup() {
32 enewgroup tor
33 enewuser tor -1 -1 /var/lib/tor tor
34 }
35
36 src_prepare() {
37 epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
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 \
46 --disable-buf-freelists \
47 --enable-asciidoc \
48 --docdir=/usr/share/doc/${PF} \
49 $(use_enable stats instrument-downloads) \
50 $(use_enable bufferevents) \
51 $(use_enable ecc curve25519) \
52 $(use_enable nat-pmp) \
53 $(use_enable tor-hardening gcc-hardening) \
54 $(use_enable tor-hardening linker-hardening) \
55 $(use_enable transparent-proxy transparent) \
56 $(use_enable threads) \
57 $(use_enable upnp) \
58 $(use_enable web tor2web-mode) \
59 $(use_enable test unittests) \
60 $(use_enable test coverage)
61 }
62
63 src_test() {
64 emake check
65 }
66
67 src_install() {
68 newconfd "${FILESDIR}"/tor.confd tor
69 newinitd "${FILESDIR}"/tor.initd-r6 tor
70
71 emake DESTDIR="${D}" install
72
73 keepdir /var/lib/tor
74
75 dodoc README ChangeLog ReleaseNotes doc/HACKING
76
77 fperms 750 /var/lib/tor
78 fowners tor:tor /var/lib/tor
79
80 insinto /etc/tor/
81 newins "${FILESDIR}"/torrc-r1 torrc
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