blob: ff37305639286cc113efe0d17a8d0c6431426eba [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "dlm control daemon and tool"
2
3SECTION = "utils"
4HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage"
5
6REQUIRED_DISTRO_FEATURES = "systemd"
7
8SRC_URI = "https://git.fedorahosted.org/cgit/dlm.git/snapshot/${BP}.tar.xz"
9
10SRC_URI[md5sum] = "efc2ee6093aa6aa0a88aaad83e998a3f"
11SRC_URI[sha256sum] = "b89bc557aaffbab0ac005398025f247718a5589cff6574d902eaffe2b20e683e"
12
13LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
14LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
15
16DEPENDS = "corosync systemd"
17
18inherit pkgconfig systemd distro_features_check
19
20SYSTEMD_SERVICE_${PN} = "dlm.service"
21SYSTEMD_AUTO_ENABLE = "enable"
22
23export EXTRA_OEMAKE = ""
24
25do_compile_prepend() {
26 sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
27}
28
29do_compile () {
30 oe_runmake 'CC=${CC}'
31}
32
33do_install_append (){
34 install -d ${D}${sysconfdir}/sysconfig/
35 install -d ${D}${sysconfdir}/init.d/
36 install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
37 install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
38
39 # install systemd unit files
40 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
41 install -d ${D}${systemd_unitdir}/system
42 install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system
43 fi
44}
45
46do_install() {
47 oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
48}
49