diff options
| author | Marc Vertes <mvertes@free.fr> | 2021-02-28 20:50:48 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2021-02-28 20:50:48 +0100 |
| commit | 27aa16e615bbd1e9fd358bb7f894d0fbbad00938 (patch) | |
| tree | 57ce3eef32133d4bd571958976912db4ecc20bdb | |
| parent | 5bcac09370adfb26c25bdf98d371bbcc730f86c3 (diff) | |
handle git urls, add vftool
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | build.mk | 16 | ||||
| -rw-r--r-- | vftool/Makefile | 8 |
3 files changed, 22 insertions, 3 deletions
@@ -5,3 +5,4 @@ .fetch .install */*-* +*/*/ @@ -6,13 +6,23 @@ # - rules to run tests before installing # - build and run in chroot # + arc ?= $(notdir $(url)) -dir ?= $(basename $(basename $(arc))) configure_cmd ?= ./configure build_cmd ?= make install_cmd ?= sudo make install uninstall_cmd ?= sudo make uninstall +ifdef git_url + fetch_cmd = git clone --depth=1 $(git_url) + extract_cmd = : + dir ?= $(notdir $(git_url)) +else + fetch_cmd = curl -L $(url) -o $(arc) + extract_cmd = gunzip < $(arc) | tar xf - + dir ?= $(basename $(basename $(arc))) +endif + clean: rm -rf .install .build .configure .extract .fetch $(dir) @@ -43,9 +53,9 @@ fetch: .fetch @touch $@ .extract: .fetch - gunzip < $(arc) | tar xf - + $(extract_cmd) @touch $@ .fetch: - curl -L $(url) -o $(arc) + $(fetch_cmd) @touch $@ diff --git a/vftool/Makefile b/vftool/Makefile new file mode 100644 index 0000000..957e430 --- /dev/null +++ b/vftool/Makefile @@ -0,0 +1,8 @@ +# vftool is a CLI to run virtual machines on MacOS 11 only + +git_url = https://github.com/evansm7/vftool +configure_cmd = : +install_cmd = sudo cp build/vftool /usr/local/bin +uninstall_cmd = sudo rm /usr/local/bin/vftool + +include ../build.mk |
