提交 27cef44a 编写于 作者: S shirong 提交者: jia zhang

rune && shim: Fix make rpm command

1. Copy rpm package in temporary directory to top directory
2. Remove temporary directory
Signed-off-by: Nshirong <shirong@linux.alibaba.com>
上级 a8d6c29f
...@@ -4,3 +4,4 @@ build/ ...@@ -4,3 +4,4 @@ build/
_output/ _output/
shim/bin/ shim/bin/
shim/.idea/ shim/.idea/
*.rpm
PROJECT_DIR := $(shell cd ../..; pwd)
RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX) RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX)
RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz
RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz
...@@ -11,6 +12,8 @@ endif ...@@ -11,6 +12,8 @@ endif
rpm: release-tarball rpm: release-tarball
@rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/rune.spec @rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/rune.spec
@echo "the rpms of rune located in $(RPMBUILD_DIR)/RPMS" @cp $(RPMBUILD_DIR)/RPMS/x86_64/*.rpm $(PROJECT_DIR)
@rm -rf $(RPMBUILD_DIR)
@echo "the rpms of rune located in $(PROJECT_DIR)"
.PHONY: release-tarball rpm .PHONY: release-tarball rpm
# Variables for building rpm # Variables for building rpm
PROJECT_DIR := $(shell cd ../..; pwd)
RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX) RPMBUILD_DIR := $(shell mktemp -u /tmp/rpmbuild.XXXX)
RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_URL := https://github.com/alibaba/inclavare-containers/archive/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz
RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz RELEASE_TARBALL_FILE := $(RPMBUILD_DIR)/SOURCES/v$(INCLAVARE_CONTAINERS_VERSION).tar.gz
...@@ -12,6 +13,8 @@ endif ...@@ -12,6 +13,8 @@ endif
rpm: release-tarball rpm: release-tarball
@rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/shim-rune.spec @rpmbuild -D "_topdir $(RPMBUILD_DIR)" -ba centos/shim-rune.spec
@echo "the rpms of shim-rune located in $(RPMBUILD_DIR)/RPMS" @cp $(RPMBUILD_DIR)/RPMS/x86_64/*.rpm $(PROJECT_DIR)
@rm -rf $(RPMBUILD_DIR)
@echo "the rpms of shim-rune located in $(PROJECT_DIR)"
.PHONY: release-tarball rpm .PHONY: release-tarball rpm
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册