Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | SUMMARY = "Distributed block device driver for Linux" |
| 2 | DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\ |
| 3 | DRBD mirrors a block device over the network to another machine.\ |
| 4 | Think of it as networked raid 1. It is a building block for\ |
| 5 | setting up high availability (HA) clusters." |
| 6 | HOMEPAGE = "http://www.drbd.org/" |
| 7 | SECTION = "admin" |
| 8 | LICENSE = "GPL-2.0-or-later" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" |
| 10 | |
| 11 | SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \ |
| 12 | git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ |
| 13 | file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ |
| 14 | file://0001-replace-off64_t-with-off_t.patch \ |
| 15 | ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ |
| 16 | " |
| 17 | SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch " |
| 18 | SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab" |
| 19 | SRCREV_drbd-headers = "9a0f151fa0085f57910a2dcbbd658d6069554f62" |
| 20 | |
| 21 | SRCREV_FORMAT = "drbd-utils_drbd-headers" |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases" |
| 26 | |
| 27 | SYSTEMD_SERVICE:${PN} = "drbd.service" |
| 28 | SYSTEMD_AUTO_ENABLE = "disable" |
| 29 | |
| 30 | DEPENDS = "flex-native" |
| 31 | |
| 32 | inherit autotools-brokensep systemd |
| 33 | |
| 34 | EXTRA_OECONF = " \ |
| 35 | --with-initdir=/etc/init.d \ |
| 36 | --without-pacemaker \ |
| 37 | --without-rgmanager \ |
| 38 | --without-bashcompletion \ |
| 39 | --with-distro debian \ |
| 40 | --with-initscripttype=both \ |
| 41 | --with-systemdunitdir=${systemd_unitdir}/system \ |
| 42 | --without-manual \ |
| 43 | " |
| 44 | |
| 45 | # If we have inherited reproducible_build, we want to use it. |
| 46 | export WANT_DRBD_REPRODUCIBLE_BUILD = "yes" |
| 47 | |
| 48 | do_install:append() { |
| 49 | # don't install empty /var/lock and /var/run to avoid conflict with base-files |
| 50 | rm -rf ${D}${localstatedir}/lock |
| 51 | rm -rf ${D}${localstatedir}/run |
| 52 | |
| 53 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service |
| 54 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service |
| 55 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service |
| 56 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service |
| 57 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service |
| 58 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service |
| 59 | } |
| 60 | |
| 61 | RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" |
| 62 | |
| 63 | # The drbd items are explicitly put under /lib when installed. |
| 64 | # |
| 65 | FILES:${PN} += "/run" |
| 66 | FILES:${PN} += "${nonarch_base_libdir}/drbd \ |
| 67 | ${nonarch_libdir}/drbd \ |
| 68 | ${nonarch_libdir}/tmpfiles.d \ |
| 69 | ${nonarch_libdir}/drbdscripts/* \ |
| 70 | ${systemd_unitdir}/system/* \ |
| 71 | " |
| 72 | FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug" |
| 73 | |
| 74 | CLEANBROKEN = "1" |