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

Contents of /net-misc/tor/tor-0.2.3.23_rc.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Oct 21 23:45:54 2012 UTC (21 months ago) by blueness
Branch: MAIN
Version bump RC and remove older

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

1 # Copyright 1999-2012 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.3.22_rc.ebuild,v 1.1 2012/09/12 21:44:20 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 nat-pmp tor-hardening transparent-proxy threads upnp selinux web"
20
21 DEPEND="dev-libs/openssl
22 sys-libs/zlib
23 >=dev-libs/libevent-2.0.14
24 nat-pmp? ( net-libs/libnatpmp )
25 upnp? ( net-libs/miniupnpc )
26 selinux? ( sec-policy/selinux-tor )"
27 RDEPEND="${DEPEND}"
28
29 pkg_setup() {
30 enewgroup tor
31 enewuser tor -1 -1 /var/lib/tor tor
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
36 }
37
38 src_configure() {
39 # Upstream isn't sure of all the user provided CFLAGS that
40 # will break tor, but does recommend against -fstrict-aliasing.
41 # We'll filter-flags them here as we encounter them.
42 filter-flags -fstrict-aliasing
43 econf \
44 --enable-asciidoc \
45 --docdir=/usr/share/doc/${PF} \
46 $(use_enable bufferevents) \
47 $(use_enable nat-pmp) \
48 $(use_enable tor-hardening gcc-hardening) \
49 $(use_enable tor-hardening linker-hardening) \
50 $(use_enable transparent-proxy transparent) \
51 $(use_enable threads) \
52 $(use_enable upnp) \
53 $(use_enable web tor2web-mode)
54 }
55
56 src_install() {
57 newconfd "${FILESDIR}"/tor.confd tor
58 newinitd "${FILESDIR}"/tor.initd-r6 tor
59
60 emake DESTDIR="${D}" install
61
62 keepdir /var/lib/tor
63
64 dodoc README ChangeLog ReleaseNotes \
65 doc/{HACKING,TODO} \
66 doc/spec/README
67
68 fperms 750 /var/lib/tor
69 fowners tor:tor /var/lib/tor
70
71 insinto /etc/tor/
72 newins "${FILESDIR}"/torrc-r1 torrc
73 }
74
75 pkg_postinst() {
76 elog
77 elog "We created a configuration file for tor, /etc/tor/torrc, but you can"
78 elog "change it according to your needs. Use the torrc.sample that is in"
79 elog "that directory as a guide. Also, to have privoxy work with tor"
80 elog "just add the following line"
81 elog
82 elog "forward-socks4a / localhost:9050 ."
83 elog
84 elog "to /etc/privoxy/config. Notice the . at the end!"
85 elog
86 }

  ViewVC Help
Powered by ViewVC 1.1.20