diff options
-rw-r--r-- | recipes-containers/podman/podman_git.bb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb new file mode 100644 index 00000000..09c3ce05 --- /dev/null +++ b/recipes-containers/podman/podman_git.bb | |||
@@ -0,0 +1,93 @@ | |||
1 | HOMEPAGE = "https://podman.io/" | ||
2 | SUMMARY = "A daemonless container engine" | ||
3 | DESCRIPTION = "Podman is a daemonless container engine for developing, \ | ||
4 | managing, and running OCI Containers on your Linux System. Containers can \ | ||
5 | either be run as root or in rootless mode. Simply put: \ | ||
6 | `alias docker=podman`. \ | ||
7 | " | ||
8 | |||
9 | DEPENDS = " \ | ||
10 | go-metalinter-native \ | ||
11 | go-md2man-native \ | ||
12 | gpgme \ | ||
13 | libseccomp \ | ||
14 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | ||
15 | " | ||
16 | |||
17 | SRCREV = "00057929f5acfd98341964d85722383363376d52" | ||
18 | SRC_URI = " \ | ||
19 | git://github.com/containers/libpod.git;branch=master \ | ||
20 | " | ||
21 | |||
22 | LICENSE = "Apache-2.0" | ||
23 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
24 | |||
25 | GO_IMPORT = "import" | ||
26 | |||
27 | S = "${WORKDIR}/git" | ||
28 | |||
29 | PV = "1.5.1+git${SRCREV}" | ||
30 | |||
31 | PACKAGES =+ "${PN}-contrib" | ||
32 | |||
33 | PODMAN_PKG = "github.com/containers/libpod" | ||
34 | BUILDTAGS ?= "seccomp varlink remoteclient \ | ||
35 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | ||
36 | exclude_graphdriver_btrfs exclude_graphdriver_devicemapper \ | ||
37 | containers_image_ostree_stub" | ||
38 | |||
39 | # overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1 | ||
40 | export LDFLAGS="" | ||
41 | |||
42 | inherit go goarch | ||
43 | inherit systemd pkgconfig | ||
44 | |||
45 | do_configure[noexec] = "1" | ||
46 | |||
47 | EXTRA_OEMAKE = " \ | ||
48 | PREFIX=${prefix} BINDIR=${bindir} LIBEXECDIR=${libexecdir} \ | ||
49 | ETCDIR=${sysconfdir} TMPFILESDIR=${nonarch_libdir}/tmpfiles.d \ | ||
50 | SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \ | ||
51 | " | ||
52 | |||
53 | do_compile() { | ||
54 | cd ${S}/src | ||
55 | rm -rf .gopath | ||
56 | mkdir -p .gopath/src/"$(dirname "${PODMAN_PKG}")" | ||
57 | ln -sf ../../../../import/ .gopath/src/"${PODMAN_PKG}" | ||
58 | |||
59 | ln -sf "../../../import/vendor/github.com/varlink/" ".gopath/src/github.com/varlink" | ||
60 | |||
61 | export GOARCH="${BUILD_GOARCH}" | ||
62 | export GOPATH="${S}/src/.gopath" | ||
63 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | ||
64 | |||
65 | cd ${S}/src/.gopath/src/"${PODMAN_PKG}" | ||
66 | |||
67 | oe_runmake cmd/podman/varlink/iopodman.go GO=go | ||
68 | |||
69 | # Pass the needed cflags/ldflags so that cgo | ||
70 | # can find the needed headers files and libraries | ||
71 | export GOARCH=${TARGET_GOARCH} | ||
72 | export CGO_ENABLED="1" | ||
73 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
74 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
75 | |||
76 | oe_runmake BUILDTAGS="${BUILDTAGS}" | ||
77 | } | ||
78 | |||
79 | do_install() { | ||
80 | cd ${S}/src/.gopath/src/"${PODMAN_PKG}" | ||
81 | |||
82 | oe_runmake install install.docker DESTDIR="${D}" | ||
83 | } | ||
84 | |||
85 | FILES_${PN} += " \ | ||
86 | ${systemd_unitdir}/system/* \ | ||
87 | ${systemd_unitdir}/user/* \ | ||
88 | ${nonarch_libdir}/tmpfiles.d/* \ | ||
89 | ${sysconfdir}/cni \ | ||
90 | " | ||
91 | |||
92 | RDEPENDS_${PN} += "conmon runc-opencontainers iptables cni skopeo" | ||
93 | RRECOMMENDS_${PN} += "slirp4netns" | ||