blob: 4bf9944aad4b820acf85ef5e5f6294dd50f63409 [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 \
11 "
12
Brad Bishop26bdd442019-08-16 17:08:17 -040013SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e"
14SRC_URI[sha256sum] = "d59142e067cbd603aaf66151a04e9fa34330219680b8827c953d20821b951991"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
16UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases"
17UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
18
19LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
20LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
21
Brad Bishop26bdd442019-08-16 17:08:17 -040022S = "${WORKDIR}/dlm-dlm-${PV}"
23
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024DEPENDS = "corosync systemd"
25
Brad Bishop8410d612019-11-25 09:40:59 -050026inherit pkgconfig systemd features_check
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027
28PACKAGECONFIG ??= ""
29
30PACKAGECONFIG[pacemaker] = ",,pacemaker"
31
32SYSTEMD_SERVICE_${PN} = "dlm.service"
33SYSTEMD_AUTO_ENABLE = "enable"
34
35export EXTRA_OEMAKE = ""
36
37DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"
38
Brad Bishop8410d612019-11-25 09:40:59 -050039do_compile_prepend_toolchain-clang() {
40 sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile
41}
42
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043do_compile_prepend() {
44 sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
45 sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
46}
47
48do_compile () {
49 oe_runmake 'CC=${CC}'
50}
51
52do_install_append (){
53 install -d ${D}${sysconfdir}/sysconfig/
54 install -d ${D}${sysconfdir}/init.d/
55 install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
56 install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
57
58 # install systemd unit files
59 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
60 install -d ${D}${systemd_unitdir}/system
61 install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system
62 fi
63}
64
65do_install() {
66 oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
67}
68