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