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

Contents of /net-misc/tor/tor-0.2.0.32-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Dec 21 01:33:20 2008 UTC (10 years, 10 months ago) by fauli
Branch: MAIN
install limits file so tor can open more files on the system than normally allowed, this fixes bug 251171 reported by candrews AT integralblue DOT com
(Portage version: 2.1.4.5)

1 fauli 1.1 # Copyright 1999-2008 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.32.ebuild,v 1.6 2008/12/09 19:56:28 bluebird Exp $
4    
5     inherit eutils
6    
7     DESCRIPTION="Anonymizing overlay network for TCP"
8     HOMEPAGE="http://tor.eff.org"
9     MY_PV=${PV/_/-}
10     SRC_URI="http://tor.eff.org/dist/${PN}-${MY_PV}.tar.gz"
11     S="${WORKDIR}/${PN}-${MY_PV}"
12    
13     LICENSE="BSD"
14     SLOT="0"
15     KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
16     IUSE="debug logrotate"
17    
18     DEPEND="dev-libs/openssl
19     >=dev-libs/libevent-1.2"
20     RDEPEND="${DEPEND}
21     net-proxy/tsocks"
22    
23     pkg_setup() {
24     enewgroup tor
25     enewuser tor -1 -1 /var/lib/tor tor
26     }
27    
28     src_unpack() {
29     unpack ${A}
30     cd "${S}"
31     epatch "${FILESDIR}"/torrc.sample-0.1.2.6.patch
32     epatch "${FILESDIR}"/${PN}-0.2.0.30-logrotate.patch
33     }
34    
35     src_compile() {
36     econf $(use_enable debug)
37     emake || die
38     }
39    
40     src_install() {
41     newinitd "${FILESDIR}"/tor.initd-r4 tor
42     emake DESTDIR="${D}" install || die
43     keepdir /var/{lib,log,run}/tor
44    
45     dodoc README ChangeLog AUTHORS ReleaseNotes \
46     doc/{HACKING,TODO} \
47     doc/spec/*.txt
48    
49     fperms 750 /var/lib/tor /var/log/tor
50     fperms 755 /var/run/tor
51     fowners tor:tor /var/lib/tor /var/log/tor /var/run/tor
52    
53     if use logrotate; then
54     sed -e "s:/lib::" \
55     -e "s:/rc.d::" \
56     -e "s:\\*:\\*.:" \
57     -e "s:sharedscripts:create 0640 tor tor\n\tsharedscripts:" -i contrib/tor.logrotate || die
58     insinto /etc/logrotate.d
59     newins contrib/tor.logrotate tor
60     fi
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 "You must create /etc/tor/torrc, you can use the sample that is in that directory"
69     elog "To have privoxy and tor working together you must add:"
70     elog "forward-socks4a / localhost:9050 ."
71     elog "(notice the . at the end of the line)"
72     elog "to /etc/privoxy/config"
73     }

  ViewVC Help
Powered by ViewVC 1.1.20