summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb
blob: 8def54ece69c2d0f539e082403a092b66d182886 (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
require wireguard.inc

SRCREV = "3ba6527130c502144e7388b900138bca6260f4e8"
SRC_URI = "git://git.zx2c4.com/wireguard-tools;branch=master"

inherit bash-completion systemd pkgconfig

DEPENDS += "libmnl"

do_install () {
    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
        SYSTEMDUNITDIR="${systemd_system_unitdir}" \
        WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
        ${PACKAGECONFIG_CONFARGS} \
        install
}

PACKAGECONFIG ??= "bash-completion wg-quick"

PACKAGECONFIG[bash-completion] = "WITH_BASHCOMPLETION=yes,WITH_BASHCOMPLETION=no,,bash,,"
PACKAGECONFIG[wg-quick]        = "WITH_WGQUICK=yes,WITH_WGQUICK=no,,bash,,"

FILES:${PN} = " \
    ${bindir}/wg \
    ${sysconfdir} \
    ${bindir}/wg-quick \
    ${systemd_system_unitdir} \
"

RRECOMMENDS:${PN} = " \
    kernel-module-wireguard \
    "