Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | require lvm2.inc |
| 2 | |
| 3 | SRC_URI[md5sum] = "bc26da66e96727babbd288bb0f050339" |
| 4 | SRC_URI[sha256sum] = "24997e26dfc916151707c9da504d38d0473bec3481a8230b676bc079041bead6" |
| 5 | |
| 6 | SRC_URI += "file://0001-explicitly-do-not-install-libdm.patch" |
| 7 | |
| 8 | DEPENDS += "autoconf-archive-native" |
| 9 | |
| 10 | inherit multilib_script |
| 11 | |
| 12 | MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf" |
| 13 | |
| 14 | CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe" |
| 15 | |
| 16 | do_install_append() { |
| 17 | # Install machine specific configuration file |
| 18 | install -d ${D}${sysconfdir}/lvm |
| 19 | install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf |
| 20 | sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf |
| 21 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 22 | oe_runmake 'DESTDIR=${D}' install install_systemd_units |
| 23 | sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service |
| 24 | else |
| 25 | oe_runmake 'DESTDIR=${D}' install install_initscripts |
| 26 | mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d |
| 27 | rm -rf ${D}${sysconfdir}/rc.d |
| 28 | fi |
| 29 | } |
| 30 | |
| 31 | PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" |
| 32 | |
| 33 | SYSTEMD_PACKAGES = "${PN}" |
| 34 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ |
| 35 | ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \ |
| 36 | blk-availability.service" |
| 37 | SYSTEMD_AUTO_ENABLE = "disable" |
| 38 | |
| 39 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 40 | |
| 41 | EXTRA_OECONF_append_class-nativesdk = " --with-confdir=${sysconfdir}" |
| 42 | |
| 43 | FILES_${PN} += "${libdir}/device-mapper/*.so" |
| 44 | FILES_${PN}-scripts = " \ |
| 45 | ${sbindir}/blkdeactivate \ |
| 46 | ${sbindir}/fsadm \ |
| 47 | ${sbindir}/lvmconf \ |
| 48 | ${sbindir}/lvmdump \ |
| 49 | " |
| 50 | # Specified explicitly for the udev rules, just in case that it does not get picked |
| 51 | # up automatically: |
| 52 | FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d" |
| 53 | RDEPENDS_${PN}-udevrules = "${PN}" |
| 54 | RDEPENDS_${PN}_append_class-target = " libdevmapper" |
| 55 | RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" |
| 56 | |
| 57 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" |
| 58 | RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" |
| 59 | |
| 60 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" |
| 61 | |
| 62 | BBCLASSEXTEND = "native nativesdk" |