summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSorin Sbarnea <ssbarnea@redhat.com>2019-11-29 10:00:13 +0000
committerSorin Sbarnea <ssbarnea@redhat.com>2019-12-05 10:34:10 +0000
commita03c3a9318926c1b03d30a6aba6d10d8ba471475 (patch)
tree3e41508a8075ccd1dca97cb7ad89abe4fa9df87b /Makefile
parentbc40282aec08b71719c55dc9416f776868ef9f62 (diff)
downloadpodman-a03c3a9318926c1b03d30a6aba6d10d8ba471475.tar.gz
podman-a03c3a9318926c1b03d30a6aba6d10d8ba471475.tar.bz2
podman-a03c3a9318926c1b03d30a6aba6d10d8ba471475.zip
Enable multi-platform rpm building
- make: fix python detection for multiple interpreters - make: create generic `package` and `package-install` targets - build_rpm.sh: move package installation into package-install - build_rpm.sh: fix dnf/yum detection - build_rpm.sh: install md2man rpm only on platfroms where is available - build_rpm.sh: temporary skip packaging docs and debug on rhel-8 - docs: `make package-install` This change is validated by new CI jobs run by rdoproject. See link below for result. Depends-On: https://review.rdoproject.org/r/#/c/23943/ Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8795dd5ff..bb8b37cfb 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,9 @@ BUILDTAGS ?= \
exclude_graphdriver_devicemapper \
seccomp \
varlink
-PYTHON ?= $(shell command -v python python3)
+PYTHON ?= $(shell command -v python python3|head -n1)
+PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
+
GO_BUILD=$(GO) build
# Go module support: set `-mod=vendor` to use the vendored sources
@@ -543,12 +545,19 @@ vendor-in-container:
install.libseccomp.sudo \
lint \
pause \
+ package \
+ package-install \
shell \
uninstall \
validate \
validate.completions \
vendor
-rpm:
- @echo "Building rpms ..."
+package: ## Build rpm packages
+ ## TODO(ssbarnea): make version number predictable, it should not change
+ ## on each execution, producing duplicates.
+ rm -f ~/rpmbuild/RPMS/x86_64/* ~/rpmbuild/RPMS/noarch/*
./contrib/build_rpm.sh
+
+package-install: package ## Install rpm packages
+ sudo ${PKG_MANAGER} -y install --allowerasing ${HOME}/rpmbuild/RPMS/*/*.rpm