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 | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | file://init \ |
| 14 | file://default \ |
| 15 | file://rngd.service \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | " |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 17 | SRCREV = "eb5e34c7fb05594760f99d863fbe0401fe297b93" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 18 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | S = "${WORKDIR}/git" |
| 20 | |
| 21 | inherit autotools update-rc.d systemd pkgconfig |
| 22 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | PACKAGECONFIG ??= "libgcrypt libjitterentropy" |
| 24 | PACKAGECONFIG_libc-musl = "libargp libjitterentropy" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 25 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
| 27 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
| 28 | PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 29 | PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" |
| 31 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 32 | INITSCRIPT_NAME = "rng-tools" |
| 33 | INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." |
| 34 | |
| 35 | SYSTEMD_SERVICE_${PN} = "rngd.service" |
| 36 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 37 | # Refer autogen.sh in rng-tools |
| 38 | do_configure_prepend() { |
| 39 | cp ${S}/README.md ${S}/README |
| 40 | } |
| 41 | |
| 42 | do_install_append() { |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 43 | 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 Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 48 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
| 49 | -e 's,@SBINDIR@,${sbindir},g' \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 50 | ${D}${sysconfdir}/init.d/rng-tools \ |
| 51 | ${D}${systemd_system_unitdir}/rngd.service |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 52 | } |