aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/podman-tui/podman-tui_git.bb
blob: 90c196c8b16093ade56c318636438174638abe37 (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
69
70
71
72
73
74
HOMEPAGE = "https://github.com/containers/podman-tui"
SUMMARY =  "podman-tui is a Terminal User Interface to interact with podman"
DESCRIPTION = "podman-tui is a Terminal User Interface to interact with the podman v4. \
podman bindings has been used to communicate with podman environment through rest api API (unix socket). \
    "

inherit features_check
REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6"

DEPENDS = " \
    libseccomp \
    libdevmapper \
    lvm2 \
    btrfs-tools \
    gpgme \
    libassuan \
    libgpg-error \
"

SRCREV_FORMAT = "podmantui_storage"
SRCREV_podmantui = "c545dbd7220c2d85a0e92371f0e240d2c8b7c836"
SRCREV_storage = "246ba3062e8b551026aef2708eee747014ce5c52"
SRC_URI = " \
    git://github.com/containers/podman-tui;protocol=https;name=podmantui;branch=release-v0.14 \
"
# Due to some other API changes, we can't directly import containers/storage at
# the right commit, so we instead extract a patch and apply it to the tree
#SRC_URI += "git://github.com/containers/storage;protocol=https;name=storage;branch=release-v0.14;destsuffix=git/src/import/vendor/github.com/containers/storage"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

GO_IMPORT = "import"

S = "${WORKDIR}/git"

PV = "v0.14.0+git"

PODMAN_PKG = "github.com/containers/podman-tui"

inherit go goarch
inherit pkgconfig

COMPATIBLE_HOST = "^(?!mips).*"

do_configure[noexec] = "1"

BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper"

do_compile() {
	cd ${S}/src

	rm -rf .gopath
	mkdir -p .gopath/src/"$(dirname "${PODMAN_PKG}")"
	ln -sf ../../../../import/ .gopath/src/"${PODMAN_PKG}"

	cd ${S}/src/.gopath/src/"${PODMAN_PKG}"

	# Pass the needed cflags/ldflags so that cgo
	# can find the needed headers files and libraries
	export GOFLAGS="-mod=vendor"

	# oe_runmake BUILDTAGS="${BUILDTAGS}"
	${GO} build -trimpath -tags "$(BUILDTAGS)" ${GO_LDFLAGS} -o bin/podman-tui
}

do_install() {
	cd ${S}/src/.gopath/src/"${PODMAN_PKG}"

	install -d ${D}/${bindir}
	install bin/podman-tui ${D}/${bindir}/
}

RDEPENDS:${PN} += "podman"