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