1 include $(TOPDIR
)/rules.mk
3 PKG_NAME
:=oci-runtime-tools
4 PKG_VERSION
:=1.0.0-pre20210122
6 PKG_LICENSE
:=Apache-2.0
7 PKG_LICENSE_FILES
:=LICENSE
10 PKG_SOURCE_NAME
:=runtime-tools
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_URL
:=https
://github.com
/opencontainers
/runtime-tools.git
13 PKG_SOURCE_VERSION
:=453547deb724af135587e654f52d86b8619f21b9
14 PKG_MIRROR_HASH
:=34f3aefc4f6f3bb93330ec7cbeb2eb987b82184da53d453e8b04b5750faa8728
16 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
18 PKG_BUILD_DEPENDS
:=golang
/host
22 GO_PKG
:=github.com
/opencontainers
/runtime-tools
/
23 GO_PKG_LDFLAGS_X
:=main.gitCommit
=$(PKG_SOURCE_VERSION
) main.version
=$(PKG_SOURCE_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
26 include ..
/..
/lang
/golang
/golang-package.mk
28 define Package
/oci-runtime-tool
31 TITLE
:=oci-runtime-tool
32 URL
:=https
://github.com
/opencontainers
/runtime-tools
33 DEPENDS
:=$(GO_ARCH_DEPENDS
)
36 define Package
/oci-runtime-tool
/description
37 OCI
(Open Container Initiative
) runtime tools
38 Generate OCI runtime spec configuration files and validate OCI bundles.
41 define Package
/oci-runtime-tests
44 TITLE
:=OCI runtimetest tool
45 URL
:=https
://github.com
/opencontainers
/runtime-tools
46 DEPENDS
:=@
(i386||i686||x86_64
) oci-runtime-tool
+tar
49 define Package
/oci-runtime-tests
/description
50 OCI
(Open Container Initiative
) runtime tools
51 This package provides
test cases
as well
as artifacts required to
52 validate an OCI runtime.
53 Best used in combination with a TAP consumer like
'node-tap',
58 $(call GoPackage
/Build
/Compile
)
59 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
62 define Package
/oci-runtime-tool
/install
63 $(INSTALL_DIR
) $(1)/usr
/bin
64 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/oci-runtime-tool
$(1)/usr
/bin
67 define Package
/oci-runtime-tests
/install
68 $(INSTALL_DIR
) $(1)/usr
/libexec
/oci-runtime-test
69 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/runtimetest
$(1)/usr
/libexec
/oci-runtime-test
/
70 ( cd
$(PKG_BUILD_DIR
) ; $(FIND
) .
/validation
/ -name
*.go | grep
-v util | \
71 xargs
-I
'%' -n
1 basename % .go | while read testbin
; do \
72 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$${testbin} \
73 $(1)/usr
/libexec
/oci-runtime-test
/$$$${testbin}.t
; \
76 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rootfs-amd64.
tar.gz
$(1)/usr
/libexec
/oci-runtime-test
78 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/rootfs-386.
tar.gz
$(1)/usr
/libexec
/oci-runtime-test
81 $(eval
$(call GoBinPackage
,oci-runtime-tools
))
82 $(eval
$(call BuildPackage
,oci-runtime-tool
))
83 $(eval
$(call BuildPackage
,oci-runtime-tests
))