Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | require lvm2.inc |
| 2 | |
| 3 | SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" |
| 4 | |
| 5 | SRC_URI += "file://0001-explicitly-do-not-install-libdm.patch \ |
| 6 | file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ |
| 7 | " |
| 8 | |
| 9 | DEPENDS += "autoconf-archive-native" |
| 10 | |
| 11 | inherit multilib_script |
| 12 | |
| 13 | MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf" |
| 14 | |
| 15 | CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe" |
| 16 | |
| 17 | do_install_append() { |
| 18 | # Install machine specific configuration file |
| 19 | install -d ${D}${sysconfdir}/lvm |
| 20 | install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf |
| 21 | sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf |
| 22 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 23 | oe_runmake 'DESTDIR=${D}' install install_systemd_units |
| 24 | sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service |
| 25 | else |
| 26 | oe_runmake 'DESTDIR=${D}' install install_initscripts |
| 27 | mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d |
| 28 | rm -rf ${D}${sysconfdir}/rc.d |
| 29 | fi |
| 30 | } |
| 31 | |
| 32 | PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" |
| 33 | |
| 34 | SYSTEMD_PACKAGES = "${PN}" |
| 35 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ |
| 36 | blk-availability.service lvm2-pvscan@.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" |