2 # Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 SUMMARY = "OCF resource agents for use by compatible cluster managers"
17 DESCRIPTION = "A set of scripts to interface with several services \
18 to operate in a High Availability environment for both Pacemaker and \
19 rgmanager service managers."
20 HOMEPAGE = "http://sources.redhat.com/cluster/wiki/"
22 LICENSE = "GPLv2+ & LGPLv2+ & GPLv3"
23 LICENSE_${PN} = "GPLv2+ & LGPLv2+"
24 LICENSE_${PN}-dev = "GPLv2+ & LGPLv2+"
25 LICENSE_${PN}-staticdev = "GPLv2+ & LGPLv2+"
26 LICENSE_${PN}-dbg = "GPLv2+ & LGPLv2+"
27 LICENSE_${PN}-doc = "GPLv2+ & LGPLv2+"
28 LICENSE_${PN}-extra = "GPLv3"
29 LICENSE_${PN}-extra-dbg = "GPLv3"
30 LICENSE_ldirectord = "GPLv2+"
32 SRC_URI = "https://codeload.github.com/ClusterLabs/resource-agents/tar.gz/v${PV};downloadfilename=${BPN}-${PV}.tar.gz \
33 file://01-disable-doc-build.patch \
34 file://02-set-OCF_ROOT_DIR-to-libdir-ocf.patch \
35 file://03-fix-header-defs-lookup.patch \
36 file://fix-install-sh-not-found.patch \
37 file://fs.sh-fix-builds-when-srcdir-and-builddir-are-sepera.patch \
40 SRC_URI[md5sum] = "8530431861e659d4ce2f04afcc4efc03"
41 SRC_URI[sha256sum] = "863f83c724bad3a8bcff12b9c8712406c43e010041868826cad7b78fd8cfb9fb"
43 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
44 file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
45 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504"
47 DEPENDS = "cluster-glue"
49 # There are many tools and scripts that need bash and perl.
50 # lvm.sh requires: lvm2
51 # ip.sh requires: ethtool iproute2 iputils-arping
52 # fs.sh requires: e2fsprogs-e2fsck util-linux quota
53 # netfs.sh requires: procps util-linux nfs-utils
54 RDEPENDS_${PN} += "bash perl lvm2 \
55 ethtool iproute2 iputils-arping \
56 e2fsprogs-e2fsck util-linux quota \
60 inherit autotools systemd pkgconfig
62 EXTRA_OECONF += "--disable-fatal-warnings \
63 --with-rsctmpdir=/var/run/heartbeat/rsctmp"
66 rm -rf "${D}${localstatedir}/run"
67 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
70 # tickle_tcp is published under GPLv3, we just split it into ${PN}-extra,
71 # and it's required by portblock, so move portblock into ${PN}-extra together.
72 PACKAGES_prepend = "${PN}-extra ${PN}-extra-dbg ldirectord "
73 FILES_${PN}-extra = "${libdir}/resource-agents/heartbeat/tickle_tcp \
74 ${libdir}/ocf/resource.d/heartbeat/portblock \
75 ${datadir}/resource-agents/ocft/configs/portblock \
77 FILES_${PN}-extra-dbg += "${libdir}/resource-agents/heartbeat/.debug/tickle_tcp"
79 FILES_ldirectord = " \
80 ${sbindir}/ldirectord \
81 ${sysconfdir}/ha.d/resource.d/ldirectord \
82 ${sysconfdir}/init.d/ldirectord \
83 ${sysconfdir}/logrotate.d/ldirectord \
84 ${libdir}/ocf/resource.d/heartbeat/ldirectord \
86 FILES_ldirectord-doc = "${mandir}/man8/ldirectord.8*"
88 RDEPENDS_ldirectord += " \
97 perl-module-getopt-long \
99 perl-module-net-smtp \
100 perl-module-pod-usage \
104 perl-module-sys-hostname \
105 perl-module-sys-syslog \
109 SYSTEMD_PACKAGES = "ldirectord"
110 SYSTEMD_SERVICE_ldirectord += "ldirectord.service"
112 FILES_${PN} += "${datadir}/cluster/* \
113 ${libdir}/ocf/resource.d/heartbeat/ \
114 ${libdir}/ocf/lib/heartbeat/* \
115 ${libdir}/ocf/resource.d/redhat \
118 FILES_${PN}-dbg += "${libdir}/ocf/resource.d/heartbeat/.debug \
119 ${libdir}/resource-agents/heartbeat/.debug "