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-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | 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] | 11 | file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | " |
| 13 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 14 | SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e" |
| 15 | SRC_URI[sha256sum] = "d59142e067cbd603aaf66151a04e9fa34330219680b8827c953d20821b951991" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 16 | |
| 17 | UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases" |
| 18 | UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)" |
| 19 | |
| 20 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
| 21 | LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" |
| 22 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 23 | S = "${WORKDIR}/dlm-dlm-${PV}" |
| 24 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | DEPENDS += "corosync" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 27 | inherit pkgconfig systemd features_check |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 28 | |
| 29 | PACKAGECONFIG ??= "" |
| 30 | |
| 31 | PACKAGECONFIG[pacemaker] = ",,pacemaker" |
| 32 | |
| 33 | SYSTEMD_SERVICE_${PN} = "dlm.service" |
| 34 | SYSTEMD_AUTO_ENABLE = "enable" |
| 35 | |
| 36 | export EXTRA_OEMAKE = "" |
| 37 | |
| 38 | DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}" |
| 39 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 40 | do_compile_prepend_toolchain-clang() { |
| 41 | sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile |
| 42 | } |
| 43 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | do_compile() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile |
| 46 | sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | oe_runmake 'CC=${CC}' |
| 48 | } |
| 49 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 50 | do_install() { |
| 51 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm |
| 53 | install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm |
| 54 | |
| 55 | # install systemd unit files |
| 56 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 57 | install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service |
| 58 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | } |
| 60 | |