summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnjan Nath <kaludios@gmail.com>2022-08-02 10:29:32 +0530
committerAshley Cui <acui@redhat.com>2022-08-04 09:46:09 -0400
commitd4481a317008a739679a3da3feead5f3c35715b0 (patch)
tree8fa65bde1e0dfdf8b06c38c2911561d4cafe8e36
parent1b3844f655cc8a13e0bd062d5fb73605c1d39c62 (diff)
downloadpodman-d4481a317008a739679a3da3feead5f3c35715b0.tar.gz
podman-d4481a317008a739679a3da3feead5f3c35715b0.tar.bz2
podman-d4481a317008a739679a3da3feead5f3c35715b0.zip
pkginstaller: makefile improvements to avoid redownloading
this updates downloading of gvproxy and qemu using a standard makefile rule which will avoid downloading them again if its already downloaded [NO NEW TESTS NEEDED] Signed-off-by: Anjan Nath <kaludios@gmail.com>
-rw-r--r--contrib/pkginstaller/Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/pkginstaller/Makefile b/contrib/pkginstaller/Makefile
index 7863a237b..c84a08482 100644
--- a/contrib/pkginstaller/Makefile
+++ b/contrib/pkginstaller/Makefile
@@ -13,11 +13,11 @@ PKG_NAME := podman-installer-macos-$(ARCH).pkg
default: pkginstaller
-get_gvproxy:
+$(TMP_DOWNLOAD)/gvproxy:
mkdir -p $(TMP_DOWNLOAD)
cd $(TMP_DOWNLOAD) && curl -sLo gvproxy $(GVPROXY_RELEASE_URL)
-get_qemu:
+$(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz:
mkdir -p $(TMP_DOWNLOAD)
cd $(TMP_DOWNLOAD) && curl -sLO $(QEMU_RELEASE_URL)
@@ -35,7 +35,7 @@ packagedir: package_root Distribution welcome.html
cp ../../LICENSE $(PACKAGE_DIR)/Resources/LICENSE.txt
cp hvf.entitlements $(PACKAGE_DIR)/
-package_root: get_gvproxy get_qemu
+package_root: clean-pkgroot $(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz $(TMP_DOWNLOAD)/gvproxy
mkdir -p $(PACKAGE_ROOT)/podman/bin $(PACKAGE_ROOT)/podman/qemu
tar -C $(PACKAGE_ROOT)/podman/qemu -xf $(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz
cp $(TMP_DOWNLOAD)/gvproxy $(PACKAGE_ROOT)/podman/bin/
@@ -53,6 +53,9 @@ _notarize: pkginstaller
notarize: _notarize
xcrun stapler staple out/$(PKG_NAME)
-.PHONY: clean
+.PHONY: clean clean-pkgroot
clean:
rm -rf $(TMP_DOWNLOAD) $(PACKAGE_ROOT) $(PACKAGE_DIR) Distribution welcome.html
+
+clean-pkgroot:
+ rm -rf $(PACKAGE_ROOT) $(PACKAGE_DIR) Distribution welcome.html