2018-01-18 23:19:47 +00:00
|
|
|
require lvm2.inc
|
|
|
|
|
2019-01-15 17:34:27 +00:00
|
|
|
SRCREV = "913c28917e62577a2ef67152b2e5159237503dda"
|
2018-01-18 23:19:47 +00:00
|
|
|
|
2019-01-15 17:34:27 +00:00
|
|
|
SRC_URI = "git://github.com/lvmteam/lvm2.git;protocol=https;branch=master \
|
|
|
|
file://lvm.conf \
|
|
|
|
file://0001-implement-libc-specific-reopen_stream.patch \
|
|
|
|
file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \
|
|
|
|
file://0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \
|
|
|
|
file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \
|
|
|
|
file://0001-Avoid-bashisms-in-init-scripts.patch \
|
|
|
|
file://0005-do-not-build-manual.patch \
|
|
|
|
file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
|
|
|
|
file://0001-explicitly-do-not-install-libdm.patch \
|
|
|
|
"
|
2018-01-18 23:19:47 +00:00
|
|
|
|
|
|
|
DEPENDS += "autoconf-archive-native"
|
|
|
|
|
2019-01-15 17:34:27 +00:00
|
|
|
inherit multilib_script
|
|
|
|
|
|
|
|
MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf"
|
|
|
|
|
2018-01-18 23:19:47 +00:00
|
|
|
CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
|
|
|
|
|
|
|
|
do_install_append() {
|
|
|
|
# Install machine specific configuration file
|
|
|
|
install -d ${D}${sysconfdir}/lvm
|
|
|
|
install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
|
|
|
|
sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
|
|
|
oe_runmake 'DESTDIR=${D}' install install_systemd_units
|
|
|
|
sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
|
|
|
|
else
|
|
|
|
oe_runmake 'DESTDIR=${D}' install install_initscripts
|
|
|
|
mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
|
|
|
|
rm -rf ${D}${sysconfdir}/rc.d
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules"
|
|
|
|
|
|
|
|
SYSTEMD_PACKAGES = "${PN}"
|
|
|
|
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
|
|
|
|
blk-availability.service"
|
|
|
|
SYSTEMD_AUTO_ENABLE = "disable"
|
|
|
|
|
|
|
|
TARGET_CC_ARCH += "${LDFLAGS}"
|
|
|
|
|
2019-01-15 17:34:27 +00:00
|
|
|
EXTRA_OECONF_append_class-nativesdk = " --with-confdir=${sysconfdir}"
|
|
|
|
|
2018-01-18 23:19:47 +00:00
|
|
|
FILES_${PN} += "${libdir}/device-mapper/*.so"
|
|
|
|
FILES_${PN}-scripts = " \
|
|
|
|
${sbindir}/blkdeactivate \
|
|
|
|
${sbindir}/fsadm \
|
|
|
|
${sbindir}/lvmconf \
|
|
|
|
${sbindir}/lvmdump \
|
|
|
|
"
|
|
|
|
# Specified explicitly for the udev rules, just in case that it does not get picked
|
|
|
|
# up automatically:
|
|
|
|
FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d"
|
2019-01-15 17:34:27 +00:00
|
|
|
RDEPENDS_${PN}-udevrules = "${PN}"
|
2018-01-18 23:19:47 +00:00
|
|
|
RDEPENDS_${PN}_append_class-target = " libdevmapper"
|
2019-01-15 17:34:27 +00:00
|
|
|
RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper"
|
2018-01-18 23:19:47 +00:00
|
|
|
|
|
|
|
RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
|
|
|
|
RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
|
|
|
|
|
|
|
|
CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
|
|
|
|
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|