Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Random number generator daemon" |
| 2 | LICENSE = "GPLv2" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc" |
| 4 | |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 5 | SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | file://rng-tools-5-fix-textrels-on-PIC-x86.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | file://read_error_msg.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 11 | file://init \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | file://default \ |
| 13 | file://rngd.service \ |
| 14 | " |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 15 | |
| 16 | SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68" |
| 17 | SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e" |
| 18 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | inherit autotools update-rc.d systemd |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | |
| 21 | PACKAGECONFIG = "libgcrypt" |
| 22 | PACKAGECONFIG_libc-musl = "libargp" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 24 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
| 25 | |
| 26 | do_install_append() { |
| 27 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. |
| 28 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 29 | install -d "${D}${sysconfdir}/init.d" |
| 30 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools |
| 31 | sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \ |
| 32 | ${D}${sysconfdir}/init.d/rng-tools |
| 33 | |
| 34 | install -d "${D}${sysconfdir}/default" |
| 35 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools |
| 36 | fi |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 37 | |
| 38 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 39 | install -d ${D}${systemd_unitdir}/system |
| 40 | install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system |
| 41 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service |
| 42 | fi |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | INITSCRIPT_NAME = "rng-tools" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 46 | INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 47 | |
| 48 | SYSTEMD_SERVICE_${PN} = "rngd.service" |