Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "Virtual EtherDrive blade AoE target" |
| 2 | SECTION = "admin" |
| 3 | |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 6 | |
| 7 | SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \ |
| 8 | file://cross.patch \ |
| 9 | file://makefile-add-ldflags.patch \ |
| 10 | file://${BPN}.conf \ |
| 11 | file://${BPN}.init \ |
| 12 | file://${BPN}.service \ |
| 13 | file://volatiles.99_vblade \ |
| 14 | " |
| 15 | |
| 16 | SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e" |
| 17 | SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb" |
| 18 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/" |
| 20 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | inherit autotools-brokensep update-rc.d systemd |
| 22 | |
| 23 | do_install() { |
| 24 | install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade |
| 25 | install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed |
| 26 | install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8 |
| 27 | |
| 28 | install -D -m 0644 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf |
| 29 | install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN} |
| 30 | |
| 31 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 32 | install -d ${D}/${sysconfdir}/default/volatiles |
| 33 | install -m 0755 ${WORKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade |
| 34 | fi |
| 35 | |
| 36 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 37 | install -d ${D}/${bindir} |
| 38 | install -m 0755 ${WORKDIR}/${BPN}.init ${D}/${bindir}/ |
| 39 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 40 | echo "d /var/run/${BPN} 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
| 41 | |
| 42 | install -d ${D}${systemd_system_unitdir} |
| 43 | install -m 0644 ${WORKDIR}/vblade.service ${D}${systemd_system_unitdir} |
| 44 | sed -e 's,@BINDIR@,${bindir},g' -i ${D}${systemd_system_unitdir}/*.service |
| 45 | fi |
| 46 | |
| 47 | } |
| 48 | |
| 49 | INITSCRIPT_NAME = "vblade" |
| 50 | INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." |
| 51 | |
| 52 | SYSTEMD_SERVICE_${PN} = "vblade.service" |
| 53 | SYSTEMD_AUTO_ENABLE = "disable" |