aboutsummaryrefslogtreecommitdiffstats
path: root/meta-cgl-common/recipes-cgl/cluster/cluster_3.2.0.bb
blob: a6076cccdf47de1340e9ec3f44044a88921e300c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Summanry = "Red Hat Cluster"
DESCRIPTION = "Red Hat Cluster"
SECTION = "libs"
HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage"

SRC_URI = "https://releases.pagure.org/linux-cluster/cluster/${BP}.tar.xz \
           file://0001-Fix-the-kernel-source-patch.patch"


SRC_URI[md5sum] = "300d83dbbc525c3da21c2e961271c84b"
SRC_URI[sha256sum] = "4d340338c2376d369cb223469fa1a3356cce9ab5b2a0a0a33256ade2dbbe02d1"

LICENSE = "GPL-2.0-only & LGPL-2.0-only"
LIC_FILES_CHKSUM = "file://doc/README.licence;md5=ee8ae43af5ea09f12ca7f7a649764cb0"

PR = "r1"

DEPENDS = "corosync dbus openldap libxml2 ncurses perl zlib"

FILES:${PN} += "/lib/udev/rules.d/51-dlm.rules \
    ${localstatedir}/run "
FILES:${PN}-doc += "/usr/share/man3/* /usr/share/man8/*"

do_configure () {
    CFLAGS="${TARGET_CFLAGS}"       \
    CCFLAGS="${TARGET_CFLAGS}"      \
    CXXFLAGS="${TARGET_CFLAGS}"     \
    ./configure \
        --without_rgmanager \
        --disable_kernel_check \
        --without_cman \
        --without_fence \
        --without_bindings \
        --without_group \
        --without_config \
        --without_common \
        --without_dlm \
        2>&1
}

do_compile () {
    pwd
    CFLAGS="${TARGET_CFLAGS}" \
    make libdir=${STAGING_LIBDIR} incdir=${STAGING_INCDIR}          \
    CC=${TARGET_SYS}-gcc
}
do_install () {
    rm -rf ${D}
    make install DESTDIR=${D} libdir=${D}/usr/lib sbindir=${D}/usr/sbin \
                 mandir=${D}/usr/share docdir=${D}/usr/share/doc

    ## tree fix up
    # /etc/sysconfig/cman
    mkdir -p ${D}/etc/sysconfig

    # logrotate name
    mv ${D}/etc/logrotate.d/cluster ${D}/etc/logrotate.d/cman
    # fix library permissions or strip helpers won't work.
    find ${D} -name "lib*.so.*" -exec chmod 0755 {} \;
    # fix lcrso permissions or strip helpers won't work.
    find ${D} -name "*.lcrso" -exec chmod 0755 {} \;
    # remove docs
    rm -rf ${D}${datadir}/doc/cluster
    rm -rf ${D}${localstatedir}/run
    rm -rf ${D}${localstatedir}/lib
    rm -rf ${D}${localstatedir}/log
    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
}