Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces" |
| 2 | DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \ |
| 3 | APIs and libraries, default configuration files, and an init script." |
| 4 | HOMEPAGE = "http://corosync.github.io/corosync/" |
| 5 | |
| 6 | SECTION = "base" |
| 7 | |
| 8 | inherit autotools pkgconfig systemd |
| 9 | |
| 10 | SRC_URI = "http://build.clusterlabs.org/corosync/releases/${BP}.tar.gz" |
| 11 | SRC_URI[md5sum] = "8894f00d499e0755467b381e6346f9ff" |
| 12 | SRC_URI[sha256sum] = "1d48cdfa224b0ceb02e27fe9d56b738fb2a92262b04b15bb3a67e1c4248da8e2" |
| 13 | |
| 14 | LICENSE = "BSD" |
| 15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a85eb4ce24033adb6088dd1d6ffc5e5d" |
| 16 | |
| 17 | DEPENDS = "groff-native nss libqb" |
| 18 | |
| 19 | SYSTEMD_SERVICE_${PN} = "corosync.service corosync-notifyd.service" |
| 20 | SYSTEMD_AUTO_ENABLE = "enable" |
| 21 | |
| 22 | INITSCRIPT_NAME = "corosync-daemon" |
| 23 | |
| 24 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 25 | |
| 26 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_unitdir}/system/,--with-systemddir=" |
| 27 | |
| 28 | EXTRA_OECONF = "--with-upstartdir=%{_sysconfdir}/init" |
| 29 | |
| 30 | do_configure_prepend() { |
| 31 | ( cd ${S} |
| 32 | ${S}/autogen.sh ) |
| 33 | } |
| 34 | |
| 35 | do_install_append() { |
| 36 | install -d ${D}${sysconfdir}/sysconfig/ |
| 37 | install -d ${D}/${sysconfdir}/init.d |
| 38 | install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync |
| 39 | install -m 0644 ${S}/init/corosync-notifyd.conf.in ${D}${sysconfdir}/sysconfig/corosync-notifyd.conf |
| 40 | install -m 0644 ${S}/init/corosync.conf.in ${D}${sysconfdir}/sysconfig/corosync.conf |
| 41 | install -m 0644 ${S}/init/corosync.in ${D}${sysconfdir}/init.d/corosync |
| 42 | install -m 0644 ${S}/init/corosync-notifyd.in ${D}${sysconfdir}/init.d/corosync-notifyd |
| 43 | |
| 44 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 45 | install -d ${D}${systemd_unitdir}/system |
| 46 | install -m 0644 ${S}/init/corosync.service.in ${D}${systemd_unitdir}/system/corosync.service |
| 47 | install -m 0644 ${S}/init/corosync-notifyd.service.in ${D}${systemd_unitdir}/system/corosync-notifyd.service |
| 48 | sed -i -e 's,@INITWRAPPERSDIR@,${sysconfdir}/init.d,g' ${D}${systemd_unitdir}/system/corosync.service |
| 49 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service |
| 50 | sed -i -e 's,@SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/corosync-notifyd.service |
| 51 | fi |
| 52 | } |
| 53 | |
| 54 | RDEPENDS_${PN} += "bash" |
| 55 | |
| 56 | FILES_${PN}-dbg += "${libexecdir}/lcrso/.debug" |