blob: 027864a1a76bd370c9140612f7861a396f374a8b [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
8SRC_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
15SRC_URI[md5sum] = "aa604a10d5ac2d3414eb89ec6984cd12"
16SRC_URI[sha256sum] = "639ddfc82369272a68d56816689736c00b8f1b6b2869a6b66b7dbf6dad86469a"
17
18UPSTREAM_CHECK_URI = "https://pagure.io/dlm/releases"
19UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
20
21LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
22LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
23
24DEPENDS = "corosync systemd"
25
26inherit pkgconfig systemd distro_features_check
27
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
39do_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
44do_compile () {
45 oe_runmake 'CC=${CC}'
46}
47
48do_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
61do_install() {
62 oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
63}
64