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 \ |
| 11 | " |
| 12 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 13 | SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e" |
| 14 | SRC_URI[sha256sum] = "d59142e067cbd603aaf66151a04e9fa34330219680b8827c953d20821b951991" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | |
| 16 | UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases" |
| 17 | UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)" |
| 18 | |
| 19 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
| 20 | LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" |
| 21 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 22 | S = "${WORKDIR}/dlm-dlm-${PV}" |
| 23 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | DEPENDS = "corosync systemd" |
| 25 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 26 | inherit pkgconfig systemd features_check |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | |
| 28 | PACKAGECONFIG ??= "" |
| 29 | |
| 30 | PACKAGECONFIG[pacemaker] = ",,pacemaker" |
| 31 | |
| 32 | SYSTEMD_SERVICE_${PN} = "dlm.service" |
| 33 | SYSTEMD_AUTO_ENABLE = "enable" |
| 34 | |
| 35 | export EXTRA_OEMAKE = "" |
| 36 | |
| 37 | DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}" |
| 38 | |
Brad Bishop | 8410d61 | 2019-11-25 09:40:59 -0500 | [diff] [blame] | 39 | do_compile_prepend_toolchain-clang() { |
| 40 | sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile |
| 41 | } |
| 42 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | do_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 | |
| 48 | do_compile () { |
| 49 | oe_runmake 'CC=${CC}' |
| 50 | } |
| 51 | |
| 52 | do_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 | |
| 65 | do_install() { |
| 66 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} |
| 67 | } |
| 68 | |