mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-17 04:37:19 +00:00
f08a6e7c7e
-Regenerate go module dependencies and license checksums -Manually verify and complete Unknown license entries Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
91 lines
3.7 KiB
BlitzBasic
91 lines
3.7 KiB
BlitzBasic
SUMMARY = "Tailscale client and daemon"
|
|
DESCRIPTION = "The easiest, most secure way to use WireGuard and 2FA."
|
|
HOMEPAGE = "https://github.com/tailscale/tailscale"
|
|
SECTION = "networking"
|
|
|
|
LICENSE = "BSD-3-Clause"
|
|
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=cadeae10a8856ddfdb129866b75b33e3"
|
|
require ${BPN}-licenses.inc
|
|
|
|
MAJOR_MINOR = "${@oe.utils.trim_version('${PV}', 2)}"
|
|
SRC_URI = "git://github.com/tailscale/tailscale.git;protocol=https;branch=release-branch/${MAJOR_MINOR};destsuffix=${GO_SRCURI_DESTSUFFIX} \
|
|
file://default \
|
|
file://tailscaled.init \
|
|
"
|
|
SRCREV = "8f2c8d6a14419e95fb9d02d6bf6113893daef5c3"
|
|
SRCREV_SHORT = "${@d.getVar('SRCREV')[:8]}"
|
|
require ${BPN}-go-mods.inc
|
|
|
|
GO_IMPORT = "tailscale.com"
|
|
GO_INSTALL = "${GO_IMPORT}/cmd/tailscaled"
|
|
GO_LINKSHARED = ""
|
|
GOBUILDFLAGS:prepend = "-tags=${@','.join(d.getVar('PACKAGECONFIG_CONFARGS').split())} "
|
|
GO_EXTRA_LDFLAGS = "-X tailscale.com/version.longStamp=${PV}-${SRCREV_SHORT} -X tailscale.com/version.shortStamp=${PV}"
|
|
|
|
# Pass build tags so go list in update-modules discovers all conditional deps
|
|
export GOFLAGS = "-tags=${@','.join(d.getVar('PACKAGECONFIG_CONFARGS').split())}"
|
|
|
|
inherit go-mod go-mod-update-modules \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)} \
|
|
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}
|
|
|
|
PACKAGECONFIG ??= "aws bird capture cli kube ssh tap wakeonlan"
|
|
PACKAGECONFIG[aws] = "ts_aws,ts_omit_aws"
|
|
PACKAGECONFIG[bird] = "ts_bird,ts_omit_bird"
|
|
PACKAGECONFIG[capture] = "ts_capture,ts_omit_capture"
|
|
PACKAGECONFIG[cli] = "ts_include_cli,ts_omit_include_cli"
|
|
PACKAGECONFIG[completion] = "ts_completion,ts_omit_completion"
|
|
PACKAGECONFIG[kube] = "ts_kube,ts_omit_kube"
|
|
PACKAGECONFIG[ssh] = "ts_ssh,ts_omit_ssh"
|
|
PACKAGECONFIG[tap] = "ts_tap,ts_omit_tap"
|
|
PACKAGECONFIG[wakeonlan] = "ts_wakeonlan,ts_omit_wakeonlan"
|
|
|
|
INITSCRIPT_PACKAGES = "${PN}d"
|
|
INITSCRIPT_NAME:${PN}d = "tailscaled"
|
|
INITSCRIPT_PARAMS:${PN}d = "defaults 91 9"
|
|
|
|
SYSTEMD_PACKAGES = "${BPN}d"
|
|
SYSTEMD_SERVICE:${BPN}d = "${BPN}d.service"
|
|
|
|
# override do_install, since it installs in bin instead of sbin
|
|
do_install() {
|
|
install -d ${D}/${sbindir}
|
|
install -m 0755 ${B}/${GO_BUILD_BINDIR}/tailscaled ${D}/${sbindir}/tailscaled
|
|
|
|
if [ "${@bb.utils.contains('PACKAGECONFIG', 'cli', 'true', 'false', d)}" = 'true' ]; then
|
|
install -d ${D}/${bindir}
|
|
ln -sr ${D}${sbindir}/tailscaled ${D}${bindir}/tailscale
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
|
install -d ${D}${sysconfdir}/init.d
|
|
install -m 0755 ${UNPACKDIR}/tailscaled.init ${D}${sysconfdir}/init.d/tailscaled
|
|
install -d ${D}${sysconfdir}/default
|
|
install -m 644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/${BPN}d
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
|
install -d ${D}${systemd_system_unitdir}
|
|
install -m 644 ${B}/src/tailscale.com/cmd/tailscaled/tailscaled.service ${D}${systemd_system_unitdir}/${BPN}d.service
|
|
install -d ${D}${sysconfdir}/default
|
|
install -m 644 ${B}/src/tailscale.com/cmd/tailscaled/tailscaled.defaults ${D}${sysconfdir}/default/${BPN}d
|
|
fi
|
|
|
|
}
|
|
|
|
PACKAGES =+ "${PN}d"
|
|
|
|
# mark these as src, since there are bash script etc in there and QA will complain otherwise
|
|
FILES:${PN}-src += "${libdir}/go/src"
|
|
FILES:${PN}d = "${sysconfdir} ${systemd_system_unitdir}"
|
|
|
|
RDEPENDS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'completion', 'bash-completion', '', d)}"
|
|
RDEPENDS:${PN}d = "iptables"
|
|
|
|
RRECOMMENDS:${PN}d = "\
|
|
kernel-module-wireguard \
|
|
kernel-module-tun \
|
|
kernel-module-xt-mark \
|
|
kernel-module-xt-tcpudp \
|
|
kernel-module-xt-masquerade"
|