1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools systemd readme.gentoo-r1 toolchain-funcs
8 DESCRIPTION="Daemon to use hardware random number generators"
9 HOMEPAGE="https://github.com/nhorman/rng-tools"
10 SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86"
15 IUSE="jitterentropy nistbeacon pkcs11 selinux"
17 DEPEND="dev-libs/libgcrypt:0
21 app-crypt/jitterentropy:=
32 elibc_musl? ( sys-libs/argp-standalone )
35 selinux? ( sec-policy/selinux-rngd )"
43 echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
47 mv README.md README || die
51 sed -i '/^AR /d' Makefile.in || die
57 $(use_enable jitterentropy)
58 $(use_with nistbeacon)
62 econf "${myeconfargs[@]}"
67 newinitd "${FILESDIR}"/rngd-initd-6.7-r1 rngd
68 newconfd "${FILESDIR}"/rngd-confd-6.7 rngd
69 systemd_dounit "${FILESDIR}"/rngd.service
72 local DISABLE_AUTOFORMATTING=1
74 The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc')
75 to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in:
76 '${EROOT%/}/etc/conf.d/rngd'
77 reflects the correct PKCS11 engine path to be used by rngd.
79 readme.gentoo_create_doc
85 use pkcs11 && readme.gentoo_print_elog