Makefile 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. RPMS_DIR=rpm/
  2. VERSION := $(shell cat version)
  3. DIST_DOM0 ?= fc18
  4. OS ?= Linux
  5. help:
  6. @echo "make rpms -- generate binary rpm packages"
  7. @echo "make rpms-dom0 -- generate binary rpm packages for Dom0"
  8. @echo "make update-repo-current -- copy newly generated rpms to qubes yum repo"
  9. @echo "make update-repo-current-testing -- same, but to -current-testing repo"
  10. @echo "make update-repo-unstable -- same, but to -testing repo"
  11. @echo "make update-repo-installer -- copy dom0 rpms to installer repo"
  12. @echo "make clean -- cleanup"
  13. rpms: rpms-dom0
  14. rpms-vm:
  15. @true
  16. rpms-dom0:
  17. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0.spec
  18. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0-doc.spec
  19. rpm --addsign \
  20. $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION)*.rpm \
  21. $(RPMS_DIR)/noarch/qubes-core-dom0-doc-$(VERSION)*rpm
  22. clean:
  23. make -C dispvm clean
  24. make -C qmemman clean
  25. all:
  26. make all -C core
  27. make all -C core-modules
  28. make all -C tests
  29. # Currently supported only on xen
  30. ifeq ($(BACKEND_VMM),xen)
  31. make all -C qmemman
  32. make all -C dispvm
  33. endif
  34. install:
  35. ifeq ($(OS),Linux)
  36. $(MAKE) install -C linux/systemd
  37. $(MAKE) install -C linux/aux-tools
  38. $(MAKE) install -C linux/system-config
  39. endif
  40. $(MAKE) install -C qvm-tools
  41. $(MAKE) install -C core
  42. $(MAKE) install -C core-modules
  43. $(MAKE) install -C tests
  44. ifeq ($(BACKEND_VMM),xen)
  45. # Currently supported only on xen
  46. $(MAKE) install -C qmemman
  47. $(MAKE) install -C dispvm
  48. endif
  49. mkdir -p $(DESTDIR)/etc/qubes-rpc/policy
  50. mkdir -p $(DESTDIR)/usr/libexec/qubes
  51. cp qubes-rpc-policy/qubes.Filecopy.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.Filecopy
  52. cp qubes-rpc-policy/qubes.OpenInVM.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.OpenInVM
  53. cp qubes-rpc-policy/qubes.VMShell.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMShell
  54. cp qubes-rpc-policy/qubes.NotifyUpdates.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyUpdates
  55. cp qubes-rpc-policy/qubes.NotifyTools.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyTools
  56. cp qubes-rpc-policy/qubes.GetImageRGBA.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.GetImageRGBA
  57. cp qubes-rpc/qubes.NotifyUpdates $(DESTDIR)/etc/qubes-rpc/
  58. cp qubes-rpc/qubes.NotifyTools $(DESTDIR)/etc/qubes-rpc/
  59. cp qubes-rpc/qubes-notify-updates $(DESTDIR)/usr/libexec/qubes/
  60. cp qubes-rpc/qubes-notify-tools $(DESTDIR)/usr/libexec/qubes/
  61. mkdir -p $(DESTDIR)/usr/share/qubes
  62. ifeq ($(BACKEND_VMM),xen)
  63. cp xen-vm-config/vm-template.xml $(DESTDIR)/usr/share/qubes/xen-vm-template.xml
  64. cp xen-vm-config/vm-template-hvm.xml $(DESTDIR)/usr/share/qubes/
  65. endif
  66. mkdir -p $(DESTDIR)/var/lib/qubes
  67. mkdir -p $(DESTDIR)/var/lib/qubes/vm-templates
  68. mkdir -p $(DESTDIR)/var/lib/qubes/appvms
  69. mkdir -p $(DESTDIR)/var/lib/qubes/servicevms
  70. mkdir -p $(DESTDIR)/var/lib/qubes/vm-kernels
  71. mkdir -p $(DESTDIR)/var/lib/qubes/backup
  72. mkdir -p $(DESTDIR)/var/lib/qubes/dvmdata
  73. mkdir -p $(DESTDIR)/var/log/qubes
  74. mkdir -p $(DESTDIR)/var/run/qubes