blob: d708511d29837fbc1dcb3e40936fb3eadc6ec0d7 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "Distributed block device driver for Linux"
2DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
3DRBD mirrors a block device over the network to another machine.\
4Think of it as networked raid 1. It is a building block for\
5setting up high availability (HA) clusters."
6HOMEPAGE = "http://www.drbd.org/"
7SECTION = "admin"
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
10
11SRC_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 Bishop26bdd442019-08-16 17:08:17 -040014# v9.10.0
15SRCREV_drbd-utils = "859151b228d3b3aacefb09d06d515a2589c22e35"
16SRCREV_drbd-headers = "0955b3423f08f8e11ff05092bc1b766609fd804b"
Brad Bishopc342db32019-05-15 21:57:59 -040017
18S = "${WORKDIR}/git"
19
20UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
21
22SYSTEMD_SERVICE_${PN} = "drbd.service"
23SYSTEMD_AUTO_ENABLE = "disable"
24
25inherit autotools-brokensep systemd
26
27EXTRA_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 Bishop26bdd442019-08-16 17:08:17 -040038# If we have inherited reproducible_build, we want to use it.
39export WANT_DRBD_REPRODUCIBLE_BUILD = "yes"
40
Brad Bishopc342db32019-05-15 21:57:59 -040041do_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}
52do_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
58RDEPENDS_${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#
62FILES_${PN} += "/run"
63FILES_${PN} += "${nonarch_base_libdir}/drbd \
64 ${nonarch_libdir}/drbd \
65 ${nonarch_libdir}/tmpfiles.d"
66FILES_${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"