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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Dec 27 17:27:23 2009 UTC (4 years, 3 months ago) by fauli
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
clean up
(Portage version: 2.1.6.13/cvs/Linux i686)

1 # Copyright 1999-2009 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.0.35.ebuild,v 1.6 2009/07/12 00:57:38 josejx Exp $
4
5 EAPI=1
6
7 inherit eutils
8
9 DESCRIPTION="Anonymizing overlay network for TCP"
10 HOMEPAGE="http://www.torproject.org/"
11 MY_PV=${PV/_/-}
12 SRC_URI="http://www.torproject.org/dist/${PN}-${MY_PV}.tar.gz"
13 S="${WORKDIR}/${PN}-${MY_PV}"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="amd64 ppc ppc64 sparc x86 ~x86-fbsd"
18 IUSE="+bundledlibevent debug"
19
20 DEPEND="dev-libs/openssl
21 >=dev-libs/libevent-1.2"
22 RDEPEND="${DEPEND}
23 net-proxy/tsocks"
24
25 pkg_setup() {
26 enewgroup tor
27 enewuser tor -1 -1 /var/lib/tor tor
28 }
29
30 src_unpack() {
31 unpack ${A}
32 cd "${S}"
33 epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
34 epatch "${FILESDIR}"/${PN}-0.2.0.30-logrotate.patch
35 # Normally tor uses a bundled libevent fragment to provide
36 # asynchronous DNS requests. This is generally a bad idea, but at
37 # the moment the official libevent does not have the 0x20 hack, so
38 # anonymity is higher with the bundled variant. Remove patch as
39 # soon as upstream has installed the autoconf option to use
40 # system's libevent (0.2.1 or later)
41 # See http://bugs.noreply.org/flyspray/index.php?do=details&id=920
42 # for upstream's report
43 use bundledlibevent || epatch "${FILESDIR}"/${PN}-0.2.0.33-no-internal-libevent.patch
44 }
45
46 src_compile() {
47 econf $(use_enable debug)
48 emake || die
49 }
50
51 src_install() {
52 newinitd "${FILESDIR}"/tor.initd-r4 tor
53 emake DESTDIR="${D}" install || die
54 keepdir /var/{lib,log,run}/tor
55
56 dodoc README ChangeLog AUTHORS ReleaseNotes \
57 doc/{HACKING,TODO} \
58 doc/spec/*.txt
59
60 fperms 750 /var/lib/tor /var/log/tor
61 fperms 755 /var/run/tor
62 fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
63
64 sed -e "s:/lib::" \
65 -e "s:/rc.d::" \
66 -e "s:\\*:\\*.:" \
67 -e "s:sharedscripts:create 0640 tor tor\n\tsharedscripts:" -i contrib/tor.logrotate || die
68 insinto /etc/logrotate.d
69 newins contrib/tor.logrotate tor
70
71 # allow the tor user more open files to avoid errors, see bug 251171
72 insinto /etc/security/limits.d/
73 doins "${FILESDIR}"/tor.conf
74 }
75
76 pkg_postinst() {
77 elog "You must create /etc/tor/torrc, you can use the sample that is in that directory"
78 elog "To have privoxy and tor working together you must add:"
79 elog "forward-socks4a / localhost:9050 ."
80 elog "(notice the . at the end of the line)"
81 elog "to /etc/privoxy/config"
82
83 if ! use bundledlibevent; then
84 elog
85 elog "Please be aware that using the system's libevent library will lower your anonymity"
86 elog "a little bit. If you rely on it, please enable USE=bundledlibevent."
87 fi
88 }

  ViewVC Help
Powered by ViewVC 1.1.20