summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/rng-tools/rng-tools_6.11.bb
diff options
context:
space:
mode:
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.bb60
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 @@
1SUMMARY = "Random number generator daemon"
2DESCRIPTION = "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"
7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
9DEPENDS = "sysfsutils openssl"
10
11SRC_URI = "\
12 git://github.com/nhorman/rng-tools.git \
13 file://init \
14 file://default \
15 file://rngd.service \
16"
17SRCREV = "2ea13473fd5bfea3c861dc0e23bd65e2afe8007b"
18
19S = "${WORKDIR}/git"
20
21inherit autotools update-rc.d systemd pkgconfig
22
23EXTRA_OECONF = "--without-rtlsdr"
24
25PACKAGECONFIG ??= "libjitterentropy"
26PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
27
28PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
29PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
30PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
31PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"
32
33INITSCRIPT_NAME = "rng-tools"
34INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
35
36SYSTEMD_SERVICE_${PN} = "rngd.service"
37
38# Refer autogen.sh in rng-tools
39do_configure_prepend() {
40 cp ${S}/README.md ${S}/README
41}
42
43do_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}