Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "CTDB is a cluster implementation of the TDB database \ |
| 2 | used by Samba and other projects to store temporary data. If an \ |
| 3 | application is already using TDB for temporary data it is very easy \ |
| 4 | to convert that application to be cluster aware and use CTDB instead." |
| 5 | HOMEPAGE = "https://ctdb.samba.org/" |
| 6 | LICENSE = "GPL-2.0+ & LGPL-3.0+ & GPL-3.0+" |
| 7 | |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
| 9 | file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \ |
| 10 | file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ |
| 11 | " |
| 12 | |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 13 | SRC_URI = "https://ftp.samba.org/pub/${BPN}/${BP}.tar.gz \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | file://01-support-cross-compile-for-linux-os.patch \ |
| 15 | file://02-link-rep_snprintf-for-ltdbtool.patch \ |
| 16 | file://service-ensure-the-PID-directory-is-created.patch \ |
| 17 | " |
| 18 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 19 | SRC_URI[md5sum] = "efc50109f90a4c790124c35e4ba234ad" |
| 20 | SRC_URI[sha256sum] = "fc1cdd7efcc91afc629f21408281bba5da107b9c17e74bdee2f28a532d14f874" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 21 | |
| 22 | inherit autotools-brokensep pkgconfig systemd |
| 23 | |
| 24 | PACKAGECONFIG ??= "" |
| 25 | PACKAGECONFIG[libtdb] = "--without-included-tdb,--with-included-tdb,libtdb" |
| 26 | |
| 27 | PARALLEL_MAKE = "" |
| 28 | |
| 29 | DEPENDS += "popt libtevent libtalloc libldb" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | DEPENDS_append_libc-musl = " libtirpc" |
| 31 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" |
| 32 | LDFLAGS_append_libc-musl = " -ltirpc" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 33 | |
| 34 | # ctdbd_wrapper requires pgrep, hence procps |
| 35 | RDEPENDS_${PN} += "procps" |
| 36 | |
| 37 | do_configure() { |
| 38 | oe_runconf |
| 39 | } |
| 40 | |
| 41 | do_install_append() { |
| 42 | install -d ${D}${systemd_unitdir}/system |
| 43 | install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system |
| 44 | sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service |
| 45 | sed -i -e 's,\([=\ ]\)/run/,\1${localstatedir}/run/,' ${D}${systemd_unitdir}/system/ctdb.service |
| 46 | |
| 47 | rm -r ${D}/${localstatedir}/run |
| 48 | } |
| 49 | |
| 50 | # The systemd service is disabled by default, as the service will fail to |
| 51 | # start without /etc/ctdb/nodes. If the user supplies this, they can re-enable |
| 52 | # the service. |
| 53 | SYSTEMD_AUTO_ENABLE = "disable" |
| 54 | SYSTEMD_SERVICE_${PN} = "ctdb.service" |
| 55 | |
| 56 | # onnode is a shell script with bashisms and bash #! |
| 57 | RDEPENDS_${PN} += "bash" |