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 \ |
| 13 | file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \ |
| 14 | file://0002-Add-argument-to-control-the-libargp-dependency.patch \ |
| 15 | file://underquote.patch \ |
| 16 | file://rng-tools-5-fix-textrels-on-PIC-x86.patch \ |
| 17 | file://0001-configure.ac-fix-typo.patch \ |
| 18 | file://init \ |
| 19 | file://default \ |
| 20 | file://rngd.service \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | " |
| 22 | SRCREV = "4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 23 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | inherit autotools update-rc.d systemd pkgconfig |
| 27 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | PACKAGECONFIG ??= "libgcrypt libjitterentropy" |
| 29 | PACKAGECONFIG_libc-musl = "libargp libjitterentropy" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 30 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
| 32 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
| 33 | PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" |
| 34 | PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" |
| 35 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 36 | INITSCRIPT_NAME = "rng-tools" |
| 37 | INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." |
| 38 | |
| 39 | SYSTEMD_SERVICE_${PN} = "rngd.service" |
| 40 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | # Refer autogen.sh in rng-tools |
| 42 | do_configure_prepend() { |
| 43 | cp ${S}/README.md ${S}/README |
| 44 | } |
| 45 | |
| 46 | do_install_append() { |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 47 | install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools |
| 48 | install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools |
| 49 | install -Dm 0644 ${WORKDIR}/rngd.service \ |
| 50 | ${D}${systemd_system_unitdir}/rngd.service |
| 51 | sed -i \ |
| 52 | -e 's,@SYSCONFDIR@,${sysconfdir},' \ |
| 53 | -e 's,@SBINDIR@,${sbindir},' \ |
| 54 | ${D}${sysconfdir}/init.d/rng-tools \ |
| 55 | ${D}${systemd_system_unitdir}/rngd.service |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 56 | } |