diff options
Diffstat (limited to 'meta/recipes-support/rng-tools/rng-tools_6.6.bb')
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools_6.6.bb | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.6.bb b/meta/recipes-support/rng-tools/rng-tools_6.6.bb new file mode 100644 index 0000000000..033af9909d --- /dev/null +++ b/meta/recipes-support/rng-tools/rng-tools_6.6.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | SUMMARY = "Random number generator daemon" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
4 | |||
5 | SRC_URI = "git://github.com/nhorman/rng-tools.git \ | ||
6 | file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \ | ||
7 | file://0002-Add-argument-to-control-the-libargp-dependency.patch \ | ||
8 | file://underquote.patch \ | ||
9 | file://rng-tools-5-fix-textrels-on-PIC-x86.patch \ | ||
10 | file://init \ | ||
11 | file://default \ | ||
12 | file://rngd.service \ | ||
13 | " | ||
14 | SRCREV = "4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee" | ||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit autotools update-rc.d systemd pkgconfig | ||
18 | |||
19 | DEPENDS = "curl \ | ||
20 | libxml2 \ | ||
21 | openssl \ | ||
22 | sysfsutils \ | ||
23 | libgcrypt \ | ||
24 | " | ||
25 | |||
26 | PACKAGECONFIG ??= "libgcrypt libjitterentropy" | ||
27 | PACKAGECONFIG_libc-musl = "libargp" | ||
28 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," | ||
29 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," | ||
30 | PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterntropy,libjitterentropy" | ||
31 | |||
32 | # Refer autogen.sh in rng-tools | ||
33 | do_configure_prepend() { | ||
34 | cp ${S}/README.md ${S}/README | ||
35 | } | ||
36 | |||
37 | do_install_append() { | ||
38 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. | ||
39 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
40 | install -d "${D}${sysconfdir}/init.d" | ||
41 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools | ||
42 | sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \ | ||
43 | ${D}${sysconfdir}/init.d/rng-tools | ||
44 | |||
45 | install -d "${D}${sysconfdir}/default" | ||
46 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools | ||
47 | fi | ||
48 | |||
49 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
50 | install -d ${D}${systemd_unitdir}/system | ||
51 | install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system | ||
52 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service | ||
53 | fi | ||
54 | } | ||
55 | |||
56 | INITSCRIPT_NAME = "rng-tools" | ||
57 | INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." | ||
58 | |||
59 | SYSTEMD_SERVICE_${PN} = "rngd.service" | ||