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 | |
Brad Bishop | 665fd02 | 2019-08-26 01:32:28 -0400 | [diff] [blame^] | 43 | DEPENDS += "util-linux" |
| 44 | LVM2_PACKAGECONFIG_append_class-target = " \ |
| 45 | udev \ |
| 46 | " |
| 47 | PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" |
| 48 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | FILES_${PN} += "${libdir}/device-mapper/*.so" |
| 50 | FILES_${PN}-scripts = " \ |
| 51 | ${sbindir}/blkdeactivate \ |
| 52 | ${sbindir}/fsadm \ |
| 53 | ${sbindir}/lvmconf \ |
| 54 | ${sbindir}/lvmdump \ |
| 55 | " |
| 56 | # Specified explicitly for the udev rules, just in case that it does not get picked |
| 57 | # up automatically: |
| 58 | FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 59 | RDEPENDS_${PN}-udevrules = "libdevmapper" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 60 | RDEPENDS_${PN}_append_class-target = " libdevmapper" |
| 61 | RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" |
| 62 | |
| 63 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" |
| 64 | RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" |
| 65 | |
| 66 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" |
| 67 | |
| 68 | BBCLASSEXTEND = "native nativesdk" |