blob: b0afa4b0eb53f2dbb2c0525e2ce27f4518a6d076 [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 \
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 Bishop19323692019-04-05 15:28:33 -040021"
22SRCREV = "4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee"
Brad Bishop15ae2502019-06-18 21:44:24 -040023
Brad Bishop19323692019-04-05 15:28:33 -040024S = "${WORKDIR}/git"
25
26inherit autotools update-rc.d systemd pkgconfig
27
Brad Bishop19323692019-04-05 15:28:33 -040028PACKAGECONFIG ??= "libgcrypt libjitterentropy"
29PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
Brad Bishop15ae2502019-06-18 21:44:24 -040030
Brad Bishop19323692019-04-05 15:28:33 -040031PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
32PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
33PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
34PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"
35
Brad Bishop15ae2502019-06-18 21:44:24 -040036INITSCRIPT_NAME = "rng-tools"
37INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
38
39SYSTEMD_SERVICE_${PN} = "rngd.service"
40
Brad Bishop19323692019-04-05 15:28:33 -040041# Refer autogen.sh in rng-tools
42do_configure_prepend() {
43 cp ${S}/README.md ${S}/README
44}
45
46do_install_append() {
Brad Bishop15ae2502019-06-18 21:44:24 -040047 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 Bishop19323692019-04-05 15:28:33 -040056}