timer_entropyd-0.2.ebuild 975 B

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