Skip to content

Commit d4481a3

Browse files
anjannathashley-cui
authored andcommitted
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 <[email protected]>
1 parent 1b3844f commit d4481a3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

contrib/pkginstaller/Makefile

+7-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ PKG_NAME := podman-installer-macos-$(ARCH).pkg
1313

1414
default: pkginstaller
1515

16-
get_gvproxy:
16+
$(TMP_DOWNLOAD)/gvproxy:
1717
mkdir -p $(TMP_DOWNLOAD)
1818
cd $(TMP_DOWNLOAD) && curl -sLo gvproxy $(GVPROXY_RELEASE_URL)
1919

20-
get_qemu:
20+
$(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz:
2121
mkdir -p $(TMP_DOWNLOAD)
2222
cd $(TMP_DOWNLOAD) && curl -sLO $(QEMU_RELEASE_URL)
2323

@@ -35,7 +35,7 @@ packagedir: package_root Distribution welcome.html
3535
cp ../../LICENSE $(PACKAGE_DIR)/Resources/LICENSE.txt
3636
cp hvf.entitlements $(PACKAGE_DIR)/
3737

38-
package_root: get_gvproxy get_qemu
38+
package_root: clean-pkgroot $(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz $(TMP_DOWNLOAD)/gvproxy
3939
mkdir -p $(PACKAGE_ROOT)/podman/bin $(PACKAGE_ROOT)/podman/qemu
4040
tar -C $(PACKAGE_ROOT)/podman/qemu -xf $(TMP_DOWNLOAD)/podman-machine-qemu-$(ARCH)-$(QEMU_VERSION).tar.xz
4141
cp $(TMP_DOWNLOAD)/gvproxy $(PACKAGE_ROOT)/podman/bin/
@@ -53,6 +53,9 @@ _notarize: pkginstaller
5353
notarize: _notarize
5454
xcrun stapler staple out/$(PKG_NAME)
5555

56-
.PHONY: clean
56+
.PHONY: clean clean-pkgroot
5757
clean:
5858
rm -rf $(TMP_DOWNLOAD) $(PACKAGE_ROOT) $(PACKAGE_DIR) Distribution welcome.html
59+
60+
clean-pkgroot:
61+
rm -rf $(PACKAGE_ROOT) $(PACKAGE_DIR) Distribution welcome.html

0 commit comments

Comments
 (0)