Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Random number generator daemon" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 2 | DESCRIPTION = "Check and feed random data from hardware device to kernel" |
| 3 | AUTHOR = "Philipp Rumpf, Jeff Garzik <jgarzik@pobox.com>, \ |
| 4 | Henrique de Moraes Holschuh <hmh@debian.org>" |
| 5 | HOMEPAGE = "https://github.com/nhorman/rng-tools" |
| 6 | BUGTRACKER = "https://github.com/nhorman/rng-tools/issues" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 7 | LICENSE = "GPLv2" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 9 | DEPENDS = "sysfsutils" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 11 | SRC_URI = "\ |
| 12 | git://github.com/nhorman/rng-tools.git \ |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame^] | 13 | file://fix-rngd-fail-to-stop.patch \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 14 | file://init \ |
| 15 | file://default \ |
| 16 | file://rngd.service \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | " |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame^] | 18 | SRCREV = "9fc873c5af0e392632e6b736938b811f7ca97251" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 19 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit autotools update-rc.d systemd pkgconfig |
| 23 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | PACKAGECONFIG ??= "libgcrypt libjitterentropy" |
| 25 | PACKAGECONFIG_libc-musl = "libargp libjitterentropy" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 26 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
| 28 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
| 29 | PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame^] | 30 | PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" |
| 32 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 33 | INITSCRIPT_NAME = "rng-tools" |
| 34 | INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." |
| 35 | |
| 36 | SYSTEMD_SERVICE_${PN} = "rngd.service" |
| 37 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | # Refer autogen.sh in rng-tools |
| 39 | do_configure_prepend() { |
| 40 | cp ${S}/README.md ${S}/README |
| 41 | } |
| 42 | |
| 43 | do_install_append() { |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 44 | install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools |
| 45 | install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools |
| 46 | install -Dm 0644 ${WORKDIR}/rngd.service \ |
| 47 | ${D}${systemd_system_unitdir}/rngd.service |
| 48 | sed -i \ |
| 49 | -e 's,@SYSCONFDIR@,${sysconfdir},' \ |
| 50 | -e 's,@SBINDIR@,${sbindir},' \ |
| 51 | ${D}${sysconfdir}/init.d/rng-tools \ |
| 52 | ${D}${systemd_system_unitdir}/rngd.service |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | } |