rng-tools-5-r2.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils autotools systemd toolchain-funcs
  5. DESCRIPTION="Daemon to use hardware random number generators"
  6. HOMEPAGE="http://gkernel.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/gkernel/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm ia64 ppc x86"
  11. IUSE="selinux"
  12. DEPEND="dev-libs/libgcrypt:0
  13. dev-libs/libgpg-error"
  14. RDEPEND="${DEPEND}
  15. selinux? ( sec-policy/selinux-rngd )"
  16. src_prepare() {
  17. echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
  18. epatch "${FILESDIR}"/test-for-argp.patch
  19. epatch "${FILESDIR}"/${P}-fix-textrels-on-PIC-x86.patch #469962
  20. epatch "${FILESDIR}"/${P}-man-fill-watermark.patch #555094
  21. epatch "${FILESDIR}"/${P}-man-rng-device.patch #555106
  22. epatch "${FILESDIR}"/${P}-fix-noctty.patch #556456
  23. eautoreconf
  24. sed -i '/^AR /d' Makefile.in || die
  25. tc-export AR
  26. }
  27. src_install() {
  28. default
  29. newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd
  30. newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
  31. systemd_dounit "${FILESDIR}"/rngd.service
  32. }