Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. qubesmanager/ui_%.py: ui/%.ui
  7. pyuic5 --from-imports -o $@ $<
  8. ui: $(patsubst ui/%.ui,qubesmanager/ui_%.py,$(wildcard ui/*.ui))
  9. res:
  10. pyrcc5 -o qubesmanager/resources_rc.py resources.qrc
  11. translations:
  12. $(LRELEASE_QT5) qubesmanager.pro
  13. python:
  14. $(PYTHON) ./setup.py build
  15. python_install:
  16. $(PYTHON) ./setup.py install -O1 --skip-build --root $(DESTDIR) $(SETUPTOOLS_OPTS)
  17. update_ts: res
  18. pylupdate5 qubesmanager.pro
  19. install:
  20. mkdir -p $(DESTDIR)/usr/libexec/qubes-manager/
  21. cp qubesmanager/mount_for_backup.sh $(DESTDIR)/usr/libexec/qubes-manager/
  22. cp qubesmanager/qvm_about.sh $(DESTDIR)/usr/libexec/qubes-manager/
  23. cp qubesmanager/dsa-4371-update $(DESTDIR)/usr/libexec/qubes-manager/
  24. mkdir -p $(DESTDIR)/usr/share/applications
  25. cp qubes-global-settings.desktop $(DESTDIR)/usr/share/applications/
  26. cp qubes-vm-create.desktop $(DESTDIR)/usr/share/applications/
  27. cp qubes-backup.desktop $(DESTDIR)/usr/share/applications/
  28. cp qubes-backup-restore.desktop $(DESTDIR)/usr/share/applications/
  29. cp qubes-qube-manager.desktop $(DESTDIR)/usr/share/applications/
  30. cp qubes-template-manager.desktop $(DESTDIR)/usr/share/applications/
  31. mkdir -p $(DESTDIR)/usr/share/desktop-directories/
  32. cp qubes-tools.directory $(DESTDIR)/usr/share/desktop-directories/
  33. mkdir -p $(DESTDIR)/etc/xdg/menus/applications-merged/
  34. cp qubes-tools.menu $(DESTDIR)/etc/xdg/menus/applications-merged/
  35. clean:
  36. rm -f qubesmanager/ui_*.py
  37. rm -rf debian/changelog.*
  38. rm -rf pkgs