1LICENSE = "Apache-2.0"
2LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
3DEPENDS = " \
4    openssl \
5    zlib \
6    boost \
7    libpam \
8    sdbusplus \
9    gtest \
10    nlohmann-json \
11    libtinyxml2 \
12    nghttp2 \
13    ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest', '', d)} \
14    ${@bb.utils.contains('PTEST_ENABLED', '1', 'gmock', '', d)} \
15"
16SRCREV = "587090cd3869ed7f419dfbf9ac3e046366a91024"
17PV = "1.0+git${SRCPV}"
18
19SRC_URI = "git://github.com/openbmc/bmcweb.git;branch=master;protocol=https"
20SRC_URI += " \
21    file://run-ptest \
22"
23
24S = "${WORKDIR}/git"
25SYSTEMD_SERVICE:${PN} += "bmcweb.service bmcweb.socket"
26
27inherit systemd
28inherit useradd
29inherit pkgconfig meson ptest
30
31PACKAGECONFIG ??= "mutual-tls-auth"
32PACKAGECONFIG[insecure-redfish-expand]="-Dinsecure-enable-redfish-query=enabled"
33PACKAGECONFIG[mutual-tls-auth]="-Dmutual-tls-auth=enabled,-Dmutual-tls-auth=disabled"
34
35MUTUAL_TLS_PARSING="CommonName"
36
37EXTRA_OEMESON = " \
38    --buildtype=minsize \
39    -Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'enabled', 'disabled', d)} \
40    ${@bb.utils.contains('PACKAGECONFIG', 'mutual-tls-auth', \
41        '-Dmutual-tls-common-name-parsing-default=' + d.getVar('MUTUAL_TLS_PARSING', True), \
42        '', d)} \
43"
44
45do_install_ptest() {
46        install -d ${D}${PTEST_PATH}/test
47        cp -rf ${B}/*_test ${D}${PTEST_PATH}/test/
48}
49
50RDEPENDS:${PN} += " \
51    jsnbd \
52    phosphor-objmgr \
53"
54
55FILES:${PN} += "${datadir}/** "
56
57USERADD_PACKAGES = "${PN}"
58# add a user called httpd for the server to assume
59USERADD_PARAM:${PN} = "-r -s /sbin/nologin bmcweb"
60
61GROUPADD_PARAM:${PN} = "web; redfish; hostconsole"
62FULL_OPTIMIZATION:append = " -Os"
63