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

Contents of /net-misc/tor/tor-0.2.2.22_alpha-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Mar 25 00:57:38 2011 UTC (3 years, 5 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Removed outdated alpha

(Portage version: 2.1.9.42/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.22_alpha-r1.ebuild,v 1.1 2011/02/10 00:21:13 blueness Exp $
4
5 EAPI=3
6
7 inherit eutils 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="debug"
20
21 # libevent-2.0 is masked but we still depend on it
22 # See: bug #206969 and https://trac.torproject.org/projects/tor/ticket/920
23 DEPEND="dev-libs/openssl
24 >=dev-libs/libevent-2.0"
25 # The tordns patch for tsocks avoids some leakage of information thus raising anonymity
26 RDEPEND="${DEPEND}
27 net-proxy/tsocks[tordns]"
28
29 pkg_setup() {
30 enewgroup tor
31 enewuser tor -1 -1 /var/lib/tor tor
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
36 epatch "${FILESDIR}"/${PN}-0.2.1.19-logrotate.patch
37 }
38
39 src_configure() {
40 econf $(use_enable debug) --docdir=/usr/share/doc/${PF}/
41 }
42
43 src_install() {
44 newinitd "${FILESDIR}"/tor.initd-r4 tor
45 emake DESTDIR="${D}" install || die
46 keepdir /var/{lib,log,run}/tor
47
48 dodoc README ChangeLog ReleaseNotes \
49 doc/{HACKING,TODO} \
50 doc/spec/*.txt
51
52 fperms 750 /var/lib/tor /var/log/tor
53 fperms 755 /var/run/tor
54 fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
55
56 insinto /etc/tor/
57 doins "${FILESDIR}"/torrc
58
59 insinto /etc/logrotate.d
60 newins contrib/tor.logrotate tor
61
62 # allow the tor user more open files to avoid errors, see bug 251171
63 insinto /etc/security/limits.d/
64 doins "${FILESDIR}"/tor.conf
65 }
66
67 pkg_postinst() {
68 elog
69 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
70 elog "change it according to your needs. Use the torrc.sample that is in"
71 elog "that directory as a guide. Also, to have privoxy work with tor"
72 elog "just add the following line"
73 elog
74 elog "forward-socks4a / localhost:9050 ."
75 elog
76 elog "to /etc/privoxy/config. Notice the . at the end!"
77 elog
78 }

  ViewVC Help
Powered by ViewVC 1.1.20