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 | |
| 8 | SRC_URI = "https://releases.pagure.org/dlm/${BP}.tar.gz \ |
| 9 | file://respect-ldflags-also-from-bin_ldflags.patch \ |
| 10 | file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \ |
| 11 | file://0001-dlm-fix-package-qa-error.patch \ |
| 12 | file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \ |
| 13 | " |
| 14 | |
| 15 | SRC_URI[md5sum] = "aa604a10d5ac2d3414eb89ec6984cd12" |
| 16 | SRC_URI[sha256sum] = "639ddfc82369272a68d56816689736c00b8f1b6b2869a6b66b7dbf6dad86469a" |
| 17 | |
| 18 | UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases" |
| 19 | UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)" |
| 20 | |
| 21 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
| 22 | LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d" |
| 23 | |
| 24 | DEPENDS = "corosync systemd" |
| 25 | |
| 26 | inherit pkgconfig systemd distro_features_check |
| 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 | |
| 39 | do_compile_prepend() { |
| 40 | sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile |
| 41 | sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile |
| 42 | } |
| 43 | |
| 44 | do_compile () { |
| 45 | oe_runmake 'CC=${CC}' |
| 46 | } |
| 47 | |
| 48 | do_install_append (){ |
| 49 | install -d ${D}${sysconfdir}/sysconfig/ |
| 50 | install -d ${D}${sysconfdir}/init.d/ |
| 51 | install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm |
| 52 | install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm |
| 53 | |
| 54 | # install systemd unit files |
| 55 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 56 | install -d ${D}${systemd_unitdir}/system |
| 57 | install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system |
| 58 | fi |
| 59 | } |
| 60 | |
| 61 | do_install() { |
| 62 | oe_runmake install DESTDIR=${D} LIBDIR=${libdir} |
| 63 | } |
| 64 | |