summaryrefslogtreecommitdiffstats
path: root/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb
blob: 50a674910b3a616eb7571c2f88f2290dc7a6ae97 (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
include ${BPN}.inc

DEFAULT_PREFERENCE = "-1"

PVBASE := "${PV}"
PV = "${PVBASE}.${SRCPV}"

SRC_URI = "git://github.com/tpm2-software/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}"

def version_git(d):
    version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN'))
    if version is not None and "git" in version:
        return d.getVar("AUTOREV")
    else:
        return "35ab16e1d328f709d6146221a371b7341b84b670"
SRCREV ?= '${@version_git(d)}'

S = "${WORKDIR}/${BPN}"

do_configure_prepend () {
    # Execute the bootstrap script, to generate src_vars.mk.
    # The actual autotools bootstrapping is done by the normal
    # do_configure, which does a better job with it (for example,
    # it finds m4 macros also in the native sysroot).
    currentdir="$(pwd)"
    cd "${S}"
    AUTORECONF=true ./bootstrap
    cd "${currentdir}"
}