diff options
Diffstat (limited to 'meta/recipes-support/rng-tools/rng-tools_6.11.bb')
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools_6.11.bb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.11.bb b/meta/recipes-support/rng-tools/rng-tools_6.11.bb new file mode 100644 index 0000000000..61a0cef2e0 --- /dev/null +++ b/meta/recipes-support/rng-tools/rng-tools_6.11.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "Random number generator daemon" | ||
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" | ||
7 | LICENSE = "GPLv2" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
9 | DEPENDS = "sysfsutils openssl" | ||
10 | |||
11 | SRC_URI = "\ | ||
12 | git://github.com/nhorman/rng-tools.git \ | ||
13 | file://init \ | ||
14 | file://default \ | ||
15 | file://rngd.service \ | ||
16 | " | ||
17 | SRCREV = "2ea13473fd5bfea3c861dc0e23bd65e2afe8007b" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit autotools update-rc.d systemd pkgconfig | ||
22 | |||
23 | EXTRA_OECONF = "--without-rtlsdr" | ||
24 | |||
25 | PACKAGECONFIG ??= "libjitterentropy" | ||
26 | PACKAGECONFIG_libc-musl = "libargp libjitterentropy" | ||
27 | |||
28 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," | ||
29 | PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" | ||
30 | PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl" | ||
31 | PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" | ||
32 | |||
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 | |||
38 | # Refer autogen.sh in rng-tools | ||
39 | do_configure_prepend() { | ||
40 | cp ${S}/README.md ${S}/README | ||
41 | } | ||
42 | |||
43 | do_install_append() { | ||
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},g' \ | ||
50 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
51 | ${D}${sysconfdir}/init.d/rng-tools \ | ||
52 | ${D}${systemd_system_unitdir}/rngd.service | ||
53 | |||
54 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'nistbeacon', 'yes', 'no', d)}" = "yes" ]; then | ||
55 | sed -i \ | ||
56 | -e '/^IPAddressDeny=any/d' \ | ||
57 | -e '/^RestrictAddressFamilies=/ s/$/ AF_INET AF_INET6/' \ | ||
58 | ${D}${systemd_system_unitdir}/rngd.service | ||
59 | fi | ||
60 | } | ||