sys-apps/portage: version bump to 2.3.60
[gentoo.git] / sys-apps / timer_entropyd / timer_entropyd-0.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils flag-o-matic toolchain-funcs
7
8 DESCRIPTION="A timer-based entropy generator"
9 HOMEPAGE="http://www.vanheusden.com/te/"
10 SRC_URI="http://www.vanheusden.com/te/${P}.tgz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ~mips x86"
15 IUSE="debug selinux"
16
17 RDEPEND="selinux? ( sec-policy/selinux-entropyd )"
18
19 src_prepare() {
20         sed -i -e 's:-O2::' Makefile || die
21         epatch "${FILESDIR}"/${PN}-0.1-syslog.patch
22 }
23
24 src_compile() {
25         use debug && append-cppflags -D_DEBUG
26
27         tc-export CC
28         emake DEBUG= || die
29 }
30
31 src_install() {
32         exeinto /usr/libexec
33         doexe ${PN}
34         dodoc Changes readme.txt
35         newinitd "${FILESDIR}/timer_entropyd.initd.1" ${PN} || die
36 }
37
38 pkg_postinst() {
39         elog "To start ${PN} at boot do rc-update add ${PN} default"
40         elog "To start ${PN} now do /etc/init.d/${PN} start"
41         elog "To check the amount of entropy, cat /proc/sys/kernel/random/entropy_avail"
42 }