Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. TARGETS := $(shell ls scripts | grep -vE 'clean|run|help|docs|release|build-moby|run-moby')
  2. .dapper:
  3. @echo Downloading dapper
  4. @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m|sed 's/v7l//'` > .dapper.tmp
  5. @@chmod +x .dapper.tmp
  6. @./.dapper.tmp -v
  7. @mv .dapper.tmp .dapper
  8. $(TARGETS): .dapper
  9. ./.dapper $@
  10. trash: .dapper
  11. ./.dapper -m bind trash
  12. trash-keep: .dapper
  13. ./.dapper -m bind trash -k
  14. deps: trash
  15. build/initrd/.id: .dapper
  16. ./.dapper prepare
  17. run: build/initrd/.id .dapper
  18. ./.dapper -m bind build-target
  19. ./scripts/run
  20. docs:
  21. ./scripts/docs
  22. build-moby:
  23. ./scripts/build-moby
  24. run-moby:
  25. ./scripts/run-moby
  26. shell-bind: .dapper
  27. ./.dapper -m bind -s
  28. clean:
  29. @./scripts/clean
  30. release: .dapper release-build qcows
  31. release-build:
  32. mkdir -p dist
  33. ./.dapper release 2>&1 | tee dist/release.log
  34. itest:
  35. mkdir -p dist
  36. ./.dapper integration-test 2>&1 | tee dist/itest.log
  37. grep FAIL dist/itest.log || true
  38. qcows:
  39. cp dist/artifacts/rancheros.iso scripts/images/openstack/
  40. cd scripts/images/openstack && \
  41. APPEND="console=tty1 console=ttyS0,115200n8 printk.devkmsg=on rancher.autologin=ttyS0" \
  42. NAME=openstack ../../../.dapper
  43. cd scripts/images/openstack && \
  44. APPEND="console=tty1 rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0" \
  45. NAME=digitalocean ../../../.dapper
  46. cp ./scripts/images/openstack/dist/*.img dist/artifacts/
  47. rpi:
  48. # scripts/images/raspberry-pi-hypriot/dist/rancheros-raspberry-pi.zip
  49. cp dist/artifacts/rootfs_arm.tar.gz scripts/images/raspberry-pi-hypriot/
  50. cd scripts/images/raspberry-pi-hypriot/ \
  51. && ../../../.dapper
  52. rpi64:
  53. # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip
  54. cp dist/artifacts/rootfs_arm64.tar.gz scripts/images/raspberry-pi-hypriot64/
  55. cd scripts/images/raspberry-pi-hypriot64/ \
  56. && ../../../.dapper
  57. help:
  58. @./scripts/help
  59. .DEFAULT_GOAL := default
  60. .PHONY: $(TARGETS)