blob: 577db7087f2325237d1fe97b223314fe8c1c8c43 [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-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010 file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050011 file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 "
13
Brad Bishop26bdd442019-08-16 17:08:17 -040014SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e"
15SRC_URI[sha256sum] = "d59142e067cbd603aaf66151a04e9fa34330219680b8827c953d20821b951991"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016
17UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases"
18UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
19
20LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
21LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
22
Brad Bishop26bdd442019-08-16 17:08:17 -040023S = "${WORKDIR}/dlm-dlm-${PV}"
24
Andrew Geissler82c905d2020-04-13 13:39:40 -050025DEPENDS += "corosync"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026
Brad Bishop8410d612019-11-25 09:40:59 -050027inherit pkgconfig systemd features_check
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028
29PACKAGECONFIG ??= ""
30
31PACKAGECONFIG[pacemaker] = ",,pacemaker"
32
33SYSTEMD_SERVICE_${PN} = "dlm.service"
34SYSTEMD_AUTO_ENABLE = "enable"
35
36export EXTRA_OEMAKE = ""
37
38DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"
39
Brad Bishop8410d612019-11-25 09:40:59 -050040do_compile_prepend_toolchain-clang() {
41 sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile
42}
43
Andrew Geissler82c905d2020-04-13 13:39:40 -050044do_compile() {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045 sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
46 sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047 oe_runmake 'CC=${CC}'
48}
49
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050do_install() {
51 oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
Andrew Geissler82c905d2020-04-13 13:39:40 -050052 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 Bishop1a4b7ee2018-12-16 17:11:34 -080059}
60