mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
19
Makefile
19
Makefile
@ -43,11 +43,28 @@ $(PACKER):
|
|||||||
rm $(PACKER).zip
|
rm $(PACKER).zip
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
SDIST := dist/pwnagotchi-$(PWN_VERSION).tar.gz
|
||||||
|
$(SDIST): setup.py pwnagotchi
|
||||||
|
python3 setup.py sdist
|
||||||
|
|
||||||
|
# Building the image requires packer, but don't rebuild the image just because packer updated.
|
||||||
$(PWN_RELEASE).img: | $(PACKER)
|
$(PWN_RELEASE).img: | $(PACKER)
|
||||||
|
|
||||||
|
# If the packer or ansible files are updated, rebuild the image.
|
||||||
|
$(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json.pkr.hcl builder/raspberrypi32.yml builder/raspberrypi64.yml builder/orangepi.yml builder/extras/nexmon.yml $(shell find builder/data -type f)
|
||||||
|
|
||||||
cd builder && packer init pwnagotchi.json.pkr.hcl && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json.pkr.hcl
|
cd builder && packer init pwnagotchi.json.pkr.hcl && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json.pkr.hcl
|
||||||
|
|
||||||
|
# If any of these files are updated, rebuild the checksums.
|
||||||
|
$(PWN_RELEASE).sha256: $(PWN_RELEASE).img
|
||||||
|
sha256sum $^ > $@
|
||||||
|
|
||||||
|
# If any of the input files are updated, rebuild the archive.
|
||||||
|
$(PWN_RELEASE).zip: $(PWN_RELEASE).img $(PWN_RELEASE).sha256
|
||||||
|
zip $(PWN_RELEASE).zip $^
|
||||||
|
|
||||||
.PHONY: image
|
.PHONY: image
|
||||||
image:
|
image: $(PWN_RELEASE).zip
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- python3 setup.py clean --all
|
- python3 setup.py clean --all
|
||||||
|
Reference in New Issue
Block a user