blob: b4e453f67fbb0abbbbda94b5b5242f096efeffa3 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Random number generator daemon"
Brad Bishop15ae2502019-06-18 21:44:24 -04002DESCRIPTION = "Check and feed random data from hardware device to kernel"
3AUTHOR = "Philipp Rumpf, Jeff Garzik <jgarzik@pobox.com>, \
4 Henrique de Moraes Holschuh <hmh@debian.org>"
5HOMEPAGE = "https://github.com/nhorman/rng-tools"
6BUGTRACKER = "https://github.com/nhorman/rng-tools/issues"
Brad Bishop19323692019-04-05 15:28:33 -04007LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
Brad Bishop15ae2502019-06-18 21:44:24 -04009DEPENDS = "sysfsutils"
Brad Bishop19323692019-04-05 15:28:33 -040010
Brad Bishop15ae2502019-06-18 21:44:24 -040011SRC_URI = "\
12 git://github.com/nhorman/rng-tools.git \
Brad Bishop15ae2502019-06-18 21:44:24 -040013 file://init \
14 file://default \
15 file://rngd.service \
Brad Bishop19323692019-04-05 15:28:33 -040016"
Brad Bishopf3fd2882019-06-21 08:06:37 -040017SRCREV = "9fc873c5af0e392632e6b736938b811f7ca97251"
Brad Bishop15ae2502019-06-18 21:44:24 -040018
Brad Bishop19323692019-04-05 15:28:33 -040019S = "${WORKDIR}/git"
20
21inherit autotools update-rc.d systemd pkgconfig
22
Brad Bishop19323692019-04-05 15:28:33 -040023PACKAGECONFIG ??= "libgcrypt libjitterentropy"
24PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
Brad Bishop15ae2502019-06-18 21:44:24 -040025
Brad Bishop19323692019-04-05 15:28:33 -040026PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
27PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
28PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
Brad Bishopf3fd2882019-06-21 08:06:37 -040029PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
Brad Bishop19323692019-04-05 15:28:33 -040030PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"
31
Brad Bishop15ae2502019-06-18 21:44:24 -040032INITSCRIPT_NAME = "rng-tools"
33INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
34
35SYSTEMD_SERVICE_${PN} = "rngd.service"
36
Brad Bishop19323692019-04-05 15:28:33 -040037# Refer autogen.sh in rng-tools
38do_configure_prepend() {
39 cp ${S}/README.md ${S}/README
40}
41
42do_install_append() {
Brad Bishop15ae2502019-06-18 21:44:24 -040043 install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
44 install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
45 install -Dm 0644 ${WORKDIR}/rngd.service \
46 ${D}${systemd_system_unitdir}/rngd.service
47 sed -i \
Brad Bishop96ff1982019-08-19 13:50:42 -040048 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
49 -e 's,@SBINDIR@,${sbindir},g' \
Brad Bishop15ae2502019-06-18 21:44:24 -040050 ${D}${sysconfdir}/init.d/rng-tools \
51 ${D}${systemd_system_unitdir}/rngd.service
Brad Bishop19323692019-04-05 15:28:33 -040052}