blob: 6765667a59b47b2d89d8d775af5d9a3e15c14087 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "Random number generator daemon"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc"
4
Brad Bishop37a0e4d2017-12-04 01:01:44 -05005SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006 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 Bishopd7bf8c12018-02-25 22:55:05 -05009 file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040010 file://read_error_msg.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050011 file://init \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012 file://default \
13 file://rngd.service \
14"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050015
16SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
17SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
18
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019inherit autotools update-rc.d systemd
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020
21PACKAGECONFIG = "libgcrypt"
22PACKAGECONFIG_libc-musl = "libargp"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
25
26do_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 Bishopd7bf8c12018-02-25 22:55:05 -050037
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 Williamsd8c66bc2016-06-20 12:57:21 -050043}
44
45INITSCRIPT_NAME = "rng-tools"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047
48SYSTEMD_SERVICE_${PN} = "rngd.service"