blob: ee006efe284089eafbe508545e0462e7647cfd05 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001DESCRIPTION = "dlm control daemon and tool"
2
3SECTION = "utils"
4HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage"
5
6REQUIRED_DISTRO_FEATURES = "systemd"
7
Brad Bishop26bdd442019-08-16 17:08:17 -04008SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009 file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050010 file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
Andrew Geissler8f840682023-07-21 09:09:43 -050011 file://0001-dlm_controld-remove-unnecessary-header-include.patch \
12 file://0001-Disable-annobin-plugin.patch \
13 file://0001-Remove-fcf-protection-full.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 "
15
Andrew Geissler8f840682023-07-21 09:09:43 -050016SRC_URI[sha256sum] = "90237e18af7422ac15fc756899b3bb6932597b13342296de8e0e120e6d8729ab"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017
18UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases"
19UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
20
Andrew Geissler9aee5002022-03-30 16:27:02 +000021LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
23
Brad Bishop26bdd442019-08-16 17:08:17 -040024S = "${WORKDIR}/dlm-dlm-${PV}"
25
Andrew Geissler82c905d2020-04-13 13:39:40 -050026DEPENDS += "corosync"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027
Brad Bishop8410d612019-11-25 09:40:59 -050028inherit pkgconfig systemd features_check
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029
30PACKAGECONFIG ??= ""
31
32PACKAGECONFIG[pacemaker] = ",,pacemaker"
33
Patrick Williams213cb262021-08-07 19:21:33 -050034SYSTEMD_SERVICE:${PN} = "dlm.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035SYSTEMD_AUTO_ENABLE = "enable"
36
37export EXTRA_OEMAKE = ""
38
Andrew Geissler8f840682023-07-21 09:09:43 -050039CFPROTECTION ?= "-fcf-protection=full"
40CFPROTECTION:riscv64 = ""
41CFPROTECTION:arm = ""
Patrick Williams2a254922023-08-11 09:48:11 -050042CFPROTECTION:aarch64 = ""
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043
Andrew Geissler8f840682023-07-21 09:09:43 -050044CFLAGS += "${CFPROTECTION}"
45
46PARALLEL_MAKE = ""
47
48DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"
Brad Bishop8410d612019-11-25 09:40:59 -050049
Andrew Geissler82c905d2020-04-13 13:39:40 -050050do_compile() {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
52 sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053 oe_runmake 'CC=${CC}'
54}
55
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080056do_install() {
57 oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
Andrew Geissler82c905d2020-04-13 13:39:40 -050058 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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080065}