Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [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 = "GPLv2+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" |
| 10 | |
| 11 | SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils \ |
| 12 | git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers \ |
| 13 | " |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 14 | # v9.10.0 |
| 15 | SRCREV_drbd-utils = "859151b228d3b3aacefb09d06d515a2589c22e35" |
| 16 | SRCREV_drbd-headers = "0955b3423f08f8e11ff05092bc1b766609fd804b" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases" |
| 21 | |
| 22 | SYSTEMD_SERVICE_${PN} = "drbd.service" |
| 23 | SYSTEMD_AUTO_ENABLE = "disable" |
| 24 | |
| 25 | inherit autotools-brokensep systemd |
| 26 | |
| 27 | EXTRA_OECONF = " \ |
| 28 | --with-initdir=/etc/init.d \ |
| 29 | --without-pacemaker \ |
| 30 | --without-rgmanager \ |
| 31 | --without-bashcompletion \ |
| 32 | --with-distro debian \ |
| 33 | --with-initscripttype=both \ |
| 34 | --with-systemdunitdir=${systemd_unitdir}/system \ |
| 35 | --without-manual \ |
| 36 | " |
| 37 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 38 | # If we have inherited reproducible_build, we want to use it. |
| 39 | export WANT_DRBD_REPRODUCIBLE_BUILD = "yes" |
| 40 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 41 | do_configure_prepend() { |
| 42 | # move the the file under folder /lib/drbd/ to /usr/lib/drbd when usrmerge enabled |
| 43 | if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then |
| 44 | for m_file in `find ${S} -name 'Makefile.in'`; do |
| 45 | sed -i -e "s;\$(DESTDIR)\/lib\/drbd;\$(DESTDIR)\${nonarch_libdir}\/drbd;g" $m_file |
| 46 | done |
| 47 | # move the the file under folder /lib/udev/ to /usr/lib/udev when usrmerge enabled |
| 48 | sed -i -e "s;default_udevdir=/lib/udev;default_udevdir=\${prefix}/lib/udev;g" ${S}/configure.ac |
| 49 | fi |
| 50 | |
| 51 | } |
| 52 | do_install_append() { |
| 53 | # don't install empty /var/lock and /var/run to avoid conflict with base-files |
| 54 | rm -rf ${D}${localstatedir}/lock |
| 55 | rm -rf ${D}${localstatedir}/run |
| 56 | } |
| 57 | |
| 58 | RDEPENDS_${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" |
| 59 | |
| 60 | # The drbd items are explicitly put under /lib when installed. |
| 61 | # |
| 62 | FILES_${PN} += "/run" |
| 63 | FILES_${PN} += "${nonarch_base_libdir}/drbd \ |
| 64 | ${nonarch_libdir}/drbd \ |
| 65 | ${nonarch_libdir}/tmpfiles.d" |
| 66 | FILES_${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug" |