blob: 62bfe099f9674a38d1e5f02c1e18df24eaf0e8a0 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild,v 1.1 2010/10/23 17:19:32 flameeyes Exp $
EAPI=2
inherit eutils toolchain-funcs
MY_P="ekeyd-${PV}"
DESCRIPTION="EGD client from Entropy Key"
HOMEPAGE="http://www.entropykey.co.uk/"
SRC_URI="http://www.entropykey.co.uk/res/download/${MY_P}.tar.gz"
LICENSE="as-is" # yes, truly
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=""
DEPEND=""
S="${WORKDIR}/${MY_P}"
src_prepare() {
# avoid using -Werror
sed -i -e 's:-Werror::' daemon/Makefile || die
epatch "${FILESDIR}"/${P}-ldflags.patch
}
src_compile() {
local osname
# Override automatic detection: upstream provides this with uname,
# we don't like using uname.
case ${CHOST} in
*-linux-*)
osname=linux;;
*-freebsd*)
osname=freebsd;;
*-kfrebsd-gnu)
osname=gnukfreebsd;;
*-openbsd*)
osname=openbsd;;
*)
die "Unsupported operating system!"
;;
esac
emake -C daemon \
CC="$(tc-getCC)" \
LUA_V= LUA_INC= \
OSNAME=${osname} \
OPT="${CFLAGS}" \
egd-linux || die "emake failed"
}
src_install() {
exeinto /usr/libexec
newexe "${S}"/daemon/egd-linux ${PN} || die
doman daemon/${PN}.8 || die
newconfd "${FILESDIR}"/${PN}.conf ${PN} || die
newinitd "${FILESDIR}"/${PN}.init ${PN} || die
}
pkg_postinst() {
elog "Sysctl write support have to be enabled in order for the init script"
elog "modify the kernel.random.write_wakeup_threshold sysctl entry."
}
|