umoci: Added package for oci image management

This commit is contained in:
Suvendhu Hansa 2022-02-02 07:16:24 +00:00 committed by Vivek Kumar Dutta
parent ad7067e57b
commit f5575df624

65
umoci/Makefile Normal file
View file

@ -0,0 +1,65 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=umoci
PKG_VERSION:=0.0.1
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_PROTO:=git
PKG_SOURCE_NAME:=umoci
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/opencontainers/umoci.git
PKG_SOURCE_VERSION:=2cec49f54b72684ef170f11c708c56140f298bf7
PKG_MIRROR_HASH:=skip
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/opencontainers/umoci/
GO_PKG_LDFLAGS_X:=main.gitCommit=$(PKG_SOURCE_VERSION) main.version=$(PKG_SOURCE_VERSION)
include $(INCLUDE_DIR)/package.mk
GOLANG_PACKAGE_MK:=$(wildcard $(TOPDIR)/feeds/*/lang/golang/golang-package.mk)
# verify that there is only one single file returned
ifneq (1,$(words $(GOLANG_PACKAGE_MK)))
ifeq (0,$(words $(GOLANG_PACKAGE_MK)))
$(error did not find golang-package.mk in any feed)
else
$(error found multiple golang-package.mk files in the feeds)
endif
else
$(info found golang-package.mk at $(GOLANG_PACKAGE_MK))
endif
include $(GOLANG_PACKAGE_MK)
define Package/umoci
SECTION:=utils
CATEGORY:=Utilities
TITLE:=umoci utility
URL:=https://github.com/opencontainers/umoci
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/umoci/description
OCI (Open Container Initiative) image tool modifies Open Container images.
endef
GO_PKG_BUILD_VARS += GO111MODULE=auto
define Build/Compile
$(call GoPackage/Build/Compile)
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
endef
define Package/umoci/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/umoci $(1)/usr/bin
endef
$(eval $(call GoBinPackage,umoci))
$(eval $(call BuildPackage,umoci))