<commit_before>#
# base recipe: http://git.yoctoproject.org/cgit/cgit.cgi/meta-cgl/tree/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb
# base commit: 7<PASSWORD>
# base branch: master
#

PR = "r0"

SUMMARY = "Messaging and membership subsystem for High-Availability Linux"

inherit debian-package

LICENSE = "GPLv2 & LGPLv2.1+"
LIC_FILES_CHKSUM = " \
	file://doc/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
	file://doc/COPYING.LGPL;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
"

SRC_URI += " \
	file://membership-ccm-Makefile.am-fix-warning.patch \
	file://Makefile.am-not-chgrp-in-cross-compile.patch \
	file://configure.in-Error-and-warning-fix.patch \
	file://heartbeat-init.d-heartbeat.in-modify-parameter.patch \
	file://disable-build-doc.patch \
"
DEPENDS = "cluster-glue corosync gnutls"

inherit autotools-brokensep pkgconfig useradd

EXTRA_OECONF = " \
	STAGING_DIR_TARGET=${STAGING_DIR_TARGET} \
	--disable-fatal-warnings \
"
SOURCE1 = "heartbeat/init.d/heartbeat"
CFLAGS_append += "-DGLIB_COMPILATION"

do_configure() {
	./bootstrap
	isbigendian=`echo ${TUNE_FEATURES} | grep bigendian` || true
	if [ $isbigendian"x" = "x" ] ; then
		CPU_ENDIAN="little"
	else
		CPU_ENDIAN="big"
	fi
	cp -a ./configure ./configure.orig
	if [ ${CPU_ENDIAN} == "little" ]; then
		sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_LITTLE_ENDIAN 1\" >>confdefs.h@g" \
			-e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
		./configure.orig > ./configure
	else
	sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_BIG_ENDIAN 1\" >>confdefs.h@g" \
		-e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
		./configure.orig > ./configure
	fi
	oe_runconf ${EXTRA_OECONF}
}
do_compile_prepend() {
	sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_PREFIX}libtool
	sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_PREFIX}libtool
	make clean
}
do_install_append () {
	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
		install -d ${D}${libexecdir}
		install -m 0755 ${S}/${SOURCE1} ${D}${libexecdir}/heartbeat.init
		install -d ${D}${systemd_unitdir}/system
	fi
	ln -sf ha.d ${D}${sysconfdir}/heartbeat

}

inherit systemd

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "-r haclient"
USERADD_PARAM_${PN} = " \
	-r -g haclient -d /var/lib/heartbeat/cores/hacluster -M \
	-s /sbin/nologin -c \"heartbeat user\" hacluster \
"<commit_msg>heartbeat_debian.bb: remove creating of lib/systemd/system in do_install_append() function<commit_after>#
# base recipe: http://git.yoctoproject.org/cgit/cgit.cgi/meta-cgl/tree/meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb
# base commit: <PASSWORD>
# base branch: master
#

PR = "r0"

SUMMARY = "Messaging and membership subsystem for High-Availability Linux"

inherit debian-package

LICENSE = "GPLv2 & LGPLv2.1+"
LIC_FILES_CHKSUM = " \
	file://doc/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
	file://doc/COPYING.LGPL;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
"

SRC_URI += " \
	file://membership-ccm-Makefile.am-fix-warning.patch \
	file://Makefile.am-not-chgrp-in-cross-compile.patch \
	file://configure.in-Error-and-warning-fix.patch \
	file://heartbeat-init.d-heartbeat.in-modify-parameter.patch \
	file://disable-build-doc.patch \
"
DEPENDS = "cluster-glue corosync gnutls"

inherit autotools-brokensep pkgconfig useradd

EXTRA_OECONF = " \
	STAGING_DIR_TARGET=${STAGING_DIR_TARGET} \
	--disable-fatal-warnings \
"
SOURCE1 = "heartbeat/init.d/heartbeat"
CFLAGS_append += "-DGLIB_COMPILATION"

do_configure() {
	./bootstrap
	isbigendian=`echo ${TUNE_FEATURES} | grep bigendian` || true
	if [ $isbigendian"x" = "x" ] ; then
		CPU_ENDIAN="little"
	else
		CPU_ENDIAN="big"
	fi
	cp -a ./configure ./configure.orig
	if [ ${CPU_ENDIAN} == "little" ]; then
		sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_LITTLE_ENDIAN 1\" >>confdefs.h@g" \
			-e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
		./configure.orig > ./configure
	else
	sed -e "s@CROSS_ENDIAN_INFO@\$as_echo \"#define CONFIG_BIG_ENDIAN 1\" >>confdefs.h@g" \
		-e "s@CROSS_LIBDIR@${_LIBDIR}@g" \
		./configure.orig > ./configure
	fi
	oe_runconf ${EXTRA_OECONF}
}
do_compile_prepend() {
	sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_PREFIX}libtool
	sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_PREFIX}libtool
	make clean
}
do_install_append () {
	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
		install -d ${D}${libexecdir}
		install -m 0755 ${S}/${SOURCE1} ${D}${libexecdir}/heartbeat.init
	fi
	ln -sf ha.d ${D}${sysconfdir}/heartbeat

}

inherit systemd

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "-r haclient"
USERADD_PARAM_${PN} = " \
	-r -g haclient -d /var/lib/heartbeat/cores/hacluster -M \
	-s /sbin/nologin -c \"heartbeat user\" hacluster \
"
{'fraction_non_alphanumeric': 0.1666318646899144, 'fraction_numerical': 0.02443098768010023, 'mean_word_length': 4.582750582750583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '360504', 'n_tokens_mistral': 2152, 'n_tokens_neox': 2026, 'n_words': 302}