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 | |
| 5 | SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \ |
| 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://uclibc-libuargp-configure.patch \ |
| 10 | file://init \ |
| 11 | file://default" |
| 12 | |
| 13 | SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68" |
| 14 | SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e" |
| 15 | |
| 16 | # As the recipe doesn't inherit systemd.bbclass, we need to set this variable |
| 17 | # manually to avoid unnecessary postinst/preinst generated. |
| 18 | python () { |
| 19 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 20 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 21 | } |
| 22 | |
| 23 | inherit autotools update-rc.d |
| 24 | |
| 25 | PACKAGECONFIG = "libgcrypt" |
| 26 | PACKAGECONFIG_libc-musl = "libargp" |
| 27 | PACKAGECONFIG_libc-uclibc = "libuargp" |
| 28 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
| 29 | PACKAGECONFIG[libuargp] = "--enable-uclibc,,," |
| 30 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
| 31 | |
| 32 | do_install_append() { |
| 33 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. |
| 34 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 35 | install -d "${D}${sysconfdir}/init.d" |
| 36 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools |
| 37 | sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \ |
| 38 | ${D}${sysconfdir}/init.d/rng-tools |
| 39 | |
| 40 | install -d "${D}${sysconfdir}/default" |
| 41 | install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools |
| 42 | fi |
| 43 | } |
| 44 | |
| 45 | INITSCRIPT_NAME = "rng-tools" |
| 46 | INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ." |