summaryrefslogtreecommitdiff
blob: fa6cb331b7f3b7830f532f0f5c64b48c480a14d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit toolchain-funcs user git-2

DESCRIPTION="ChaosVPN client"
HOMEPAGE="http://wiki.hamburg.ccc.de/index.php/ChaosVPN"
EGIT_REPO_URI="git://github.com/ryd/chaosvpn.git"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="dev-libs/openssl
	net-misc/tinc"

pkg_setup() {
	enewuser chaosvpn "" "" /etc/tinc/chaos/
}

src_prepare() {
	sed -i -e "/strip/d" Makefile || die
}

src_compile() {
	emake CC=$(tc-getCC)
}

src_install() {
	default

	diropts -m0700 -o chaosvpn -g chaosvpn
	dodir /etc/tinc/chaos/

	newinitd "${FILESDIR}/${PN}.init" ${PN}
}

pkg_postinst() {
	elog "Don't forget to run"
	elog "	# tincd -n chaos --generate-keys=2048"
	elog "if this is your first install."
}