Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. VERSION := $(shell cat version)
  2. PYTHON ?= python3
  3. LRELEASE_QT5 ?= $(if $(wildcard /etc/debian_version),lrelease,lrelease-qt5)
  4. SETUPTOOLS_OPTS =
  5. SETUPTOOLS_OPTS += $(if $(wildcard /etc/debian_version),--install-layout=deb,)
  6. export QT_HASH_SEED=0
  7. export PYTHONHASHSEED=0
  8. qubesmanager/ui_%.py: ui/%.ui
  9. pyuic5 --from-imports -o $@ $<
  10. touch --reference=$< $@
  11. ui: $(patsubst ui/%.ui,qubesmanager/ui_%.py,$(wildcard ui/*.ui))
  12. res:
  13. pyrcc5 -o qubesmanager/resources_rc.py resources.qrc
  14. touch --reference=resources.qrc qubesmanager/resources_rc.py
  15. translations:
  16. $(LRELEASE_QT5) qubesmanager.pro
  17. python:
  18. $(PYTHON) ./setup.py build
  19. python_install:
  20. $(PYTHON) ./setup.py install -O1 --skip-build --root $(DESTDIR) $(SETUPTOOLS_OPTS)
  21. update_ts: res
  22. pylupdate5 qubesmanager.pro
  23. install:
  24. mkdir -p $(DESTDIR)/usr/libexec/qubes-manager/
  25. cp qubesmanager/mount_for_backup.sh $(DESTDIR)/usr/libexec/qubes-manager/
  26. cp qubesmanager/qvm_about.sh $(DESTDIR)/usr/libexec/qubes-manager/
  27. cp qubesmanager/dsa-4371-update $(DESTDIR)/usr/libexec/qubes-manager/
  28. mkdir -p $(DESTDIR)/usr/share/applications
  29. cp qubes-global-settings.desktop $(DESTDIR)/usr/share/applications/
  30. cp qubes-vm-create.desktop $(DESTDIR)/usr/share/applications/
  31. cp qubes-backup.desktop $(DESTDIR)/usr/share/applications/
  32. cp qubes-backup-restore.desktop $(DESTDIR)/usr/share/applications/
  33. cp qubes-qube-manager.desktop $(DESTDIR)/usr/share/applications/
  34. cp qubes-template-manager.desktop $(DESTDIR)/usr/share/applications/
  35. mkdir -p $(DESTDIR)/usr/share/desktop-directories/
  36. cp qubes-tools.directory $(DESTDIR)/usr/share/desktop-directories/
  37. mkdir -p $(DESTDIR)/etc/xdg/menus/applications-merged/
  38. cp qubes-tools.menu $(DESTDIR)/etc/xdg/menus/applications-merged/
  39. clean:
  40. rm -f qubesmanager/ui_*.py
  41. rm -rf debian/changelog.*
  42. rm -rf pkgs