1DESCRIPTION = "dlm control daemon and tool" 2 3SECTION = "utils" 4HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage" 5 6REQUIRED_DISTRO_FEATURES = "systemd" 7 8SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \ 9 file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \ 10 file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \ 11 file://0001-dlm_controld-remove-unnecessary-header-include.patch \ 12 file://0001-Disable-annobin-plugin.patch \ 13 file://0001-Remove-fcf-protection-full.patch \ 14 " 15 16SRC_URI[sha256sum] = "90237e18af7422ac15fc756899b3bb6932597b13342296de8e0e120e6d8729ab" 17 18UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases" 19UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)" 20 21LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later" 22LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" 23 24S = "${WORKDIR}/dlm-dlm-${PV}" 25 26DEPENDS += "corosync" 27 28inherit pkgconfig systemd features_check 29 30PACKAGECONFIG ??= "" 31 32PACKAGECONFIG[pacemaker] = ",,pacemaker" 33 34SYSTEMD_SERVICE:${PN} = "dlm.service" 35SYSTEMD_AUTO_ENABLE = "enable" 36 37export EXTRA_OEMAKE = "" 38 39CFPROTECTION ?= "-fcf-protection=full" 40CFPROTECTION:riscv64 = "" 41CFPROTECTION:arm = "" 42CFPROTECTION:aarch64 = "" 43 44CFLAGS += "${CFPROTECTION}" 45 46PARALLEL_MAKE = "" 47 48DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}" 49 50do_compile() { 51 sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile 52 sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile 53 oe_runmake 'CC=${CC}' 54} 55 56do_install() { 57 oe_runmake install DESTDIR=${D} LIBDIR=${libdir} 58 install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm 59 install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm 60 61 # install systemd unit files 62 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 63 install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service 64 fi 65} 66