Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | DESCRIPTION = "dlm control daemon and tool" |
| 2 | |
| 3 | SECTION = "utils" |
| 4 | HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage" |
| 5 | |
| 6 | REQUIRED_DISTRO_FEATURES = "systemd" |
| 7 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 8 | SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 9 | file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 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 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | " |
| 15 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "90237e18af7422ac15fc756899b3bb6932597b13342296de8e0e120e6d8729ab" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 17 | |
| 18 | UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases" |
| 19 | UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)" |
| 20 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 21 | LICENSE = "LGPL-2.0-or-later & GPL-2.0-only & GPL-2.0-or-later" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" |
| 23 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 24 | S = "${WORKDIR}/dlm-dlm-${PV}" |
| 25 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | DEPENDS += "corosync" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 28 | inherit pkgconfig systemd features_check |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
| 30 | PACKAGECONFIG ??= "" |
| 31 | |
| 32 | PACKAGECONFIG[pacemaker] = ",,pacemaker" |
| 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | SYSTEMD_SERVICE:${PN} = "dlm.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 35 | SYSTEMD_AUTO_ENABLE = "enable" |
| 36 | |
| 37 | export EXTRA_OEMAKE = "" |
| 38 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 39 | CFPROTECTION ?= "-fcf-protection=full" |
| 40 | CFPROTECTION:riscv64 = "" |
| 41 | CFPROTECTION:arm = "" |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 42 | CFPROTECTION:aarch64 = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 44 | CFLAGS += "${CFPROTECTION}" |
| 45 | |
| 46 | PARALLEL_MAKE = "" |
| 47 | |
| 48 | DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}" |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 49 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | do_compile() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile |
| 52 | sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 53 | oe_runmake 'CC=${CC}' |
| 54 | } |
| 55 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 56 | do_install() { |
| 57 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 65 | } |